Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Push a new search AI dataLayer variable on the Search page to GTM #342

Merged
merged 1 commit into from
Jun 27, 2024

Conversation

adamjarling
Copy link
Collaborator

What does this do?

When a user is on the Search page, a clicks the Gen AI checkbox toggle, the GTM VirtualPageEvent will capture a new isUsingAI dataLayer variable indicating a user is using AI chat.

How to test

  1. Navigate to Search page, leaving AI checkbox unchecked.
  2. In browser console, inspect window.dataLayer. Note isUsingAI value is false
  3. Click the AI checkbox toggle
  4. In browser console, inspect window.dataLayer. Note isUsingAI value is true

OR test via GTM Preview for the dc.northwestern.edu(next.js) account

@adamjarling adamjarling self-assigned this Jun 24, 2024
Copy link
Member

@mathewjordan mathewjordan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯

@adamjarling adamjarling merged commit 48361d4 into preview/chat-integration Jun 27, 2024
1 check passed
@adamjarling adamjarling deleted the 4805-gen-ai-datalayer branch June 27, 2024 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants