Difference between revisions of "ATC/Current/AdminGuide/Tracking snippet"
DannaShirley (talk | contribs) (Published) |
m (Text replacement - "Genesys Cloud" to "Genesys Cloud CX") |
||
(22 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
{{Article | {{Article | ||
|Standalone=No | |Standalone=No | ||
− | |DisplayName= | + | |DisplayName=Predictive Engagement tracking snippet |
|TocName=Tracking snippet | |TocName=Tracking snippet | ||
− | |Context=Learn how | + | |Context=Learn about Genesys Predictive Engagement's tracking abilities and how you can start tracking visitors on your website. |
|ComingSoon=No | |ComingSoon=No | ||
− | |Platform= | + | |Platform=PureConnect, GenesysCloud, GenesysEngage-cloud |
|Prereq='''Prerequisites''' | |Prereq='''Prerequisites''' | ||
− | *[https://help.mypurecloud.com/articles/ | + | *[https://help.mypurecloud.com/articles/?p=195191 Configure the following permissions in Genesys Cloud CX:] |
− | **'''Journey '''>''' Settings''' > '''Edit''', or '''View''' | + | **'''Journey '''>''' Settings''' > '''Edit''', or '''View''' |
|Section={{Section | |Section={{Section | ||
− | + | |alignment=Vertical | |
− | + | |structuredtext={{NoteFormat|This article only applies to customers using {{Link-SomewhereInThisVersion|manual=AdminGuide|topic=About_web_chats|display text=web chat}}. If you are a Genesys Cloud CX customer, we encourage you to use the new {{Link-AnywhereElse|product=ATC|version=Current|manual=AdminGuide|topic=About_web_messaging|display text=web messaging}} feature to replace web chat.|}} | |
− | |alignment= | + | |Status=No |
− | | | + | }}{{Section |
− | | | + | |sectionHeading=About the tracking snippets |
− | + | |anchor=AboutSnippets | |
− | + | |alignment=Vertical | |
− | + | |structuredtext=Customers who want to use web chat must deploy the Predictive Engagement tracking snippet. This snippet deploys Predictive Engagement tracking on your website and also allows you to use the {{Link-SomewhereInThisVersion|manual=AdminGuide|topic=About_web_chats|display text=web chat}} feature. | |
− | + | ||
− | + | Genesys Cloud CX customers who want to use web messaging must deploy the {{Link-SomewhereInThisVersion|manual=AdminGuide|topic=Messenger_configuration|display text=Messenger snippet}}. This snippet deploys Predictive Engagement tracking on your website and also allows you to use the {{Link-SomewhereInThisVersion|manual=AdminGuide|topic=About_web_messaging|display text=web messaging}} feature.{{NoteFormat|This article provides instructions for deploying the Predictive Engagement tracking snippet only.|}} | |
− | |||
− | {{NoteFormat| | ||
|Status=No | |Status=No | ||
}}{{Section | }}{{Section | ||
Line 28: | Line 26: | ||
|anchor=BeforeYouBegin | |anchor=BeforeYouBegin | ||
|alignment=Vertical | |alignment=Vertical | ||
− | |structuredtext= | + | |structuredtext=Read about the type of data that Genesys Predictive Engagement tracks and how to ensure that you track visitor data in a regulatory-compliant manner. Understand the implications of using ad blocking software. Finally, learn how the tracking snippet works and the types of tracking snippets available. |
+ | |||
+ | *{{Link-AnywhereElse|product=ATC|version=Current|manual=AdminGuide|topic=About_data_tracking}} | ||
+ | *{{Link-SomewhereInThisVersion|manual=AdminGuide|topic=GDPR|display text=Predictive Engagement and GDPR}} | ||
+ | *{{Link-SomewhereInThisVersion|manual=AdminGuide|topic=Tracking_snippet|anchor=AdBlockers|display text=Ad blockers}} | ||
+ | *{{Link-SomewhereInThisVersion|manual=SDK|topic=About_the_tracking_snippet}} | ||
+ | **{{Link-SomewhereInThisVersion|manual=AdminGuide|topic=Tracking_snippet|anchor=TypesofSnippets|display text=Types of snippets}} | ||
+ | **{{Link-SomewhereInThisVersion|manual=AdminGuide|topic=Tracking_snippet|anchor=SnippetRecs|display text=Snippet recommendations}} | ||
+ | *{{Link-Standalone|topic=ATC/GPEandWidgets|display text={{MINTYDOCSPRODUCT}} and widgets}} | ||
+ | *{{Link-AnywhereElse|product=ATC|version=Current|manual=AdminGuide|topic=Tracking_snippet|anchor=Deploy|display text=Deployment overview}} | ||
+ | |Status=No | ||
+ | }}{{Section | ||
+ | |sectionHeading=Copy the snippet | ||
+ | |anchor=GetSnippet | ||
+ | |alignment=Horizontal | ||
+ | |Media=Image | ||
+ | |image=TrackingSnippet.png | ||
+ | |structuredtext={{MINTYDOCSPRODUCT}} provides a tracking snippet that you can copy and paste. Since you are logged in to Genesys Cloud CX, the tracking snippet already contains your organization ID and region. | ||
− | + | #Determine {{Link-SomewhereInThisVersion|manual=AdminGuide|topic=Tracking_snippet#TypesofSnippets|display text=which snippet}} to use. | |
− | + | #In Admin in Genesys Cloud CX, open the '''Global Settings''' page and then click the '''Tracking Snippet''' tab. | |
− | + | #Copy the tracking snippet. | |
+ | #Paste the snippet. For more information about where to paste the snippet, see {{Link-SomewhereInThisVersion|manual=AdminGuide|topic=Tracking_snippet|anchor=DeploySnippet|display text=Deploy the snippet}}. <br /> | ||
|Status=No | |Status=No | ||
}}{{Section | }}{{Section | ||
Line 43: | Line 59: | ||
*uBlock Origin and uBlock Plus Adblocker block popular tag managers such as Adobe Tag Manager, Google Tag Manager, and more. | *uBlock Origin and uBlock Plus Adblocker block popular tag managers such as Adobe Tag Manager, Google Tag Manager, and more. | ||
− | {{NoteFormat|If you use a tag manager to manage JavaScript and tracking on your website, consider adding ad blocker detection to your site | + | {{NoteFormat|If you use a tag manager to manage JavaScript and tracking on your website, consider adding ad blocker detection to your site to notify visitors with detected ad blockers that they may be missing some important functionality. |
− | Also, instead of using tag | + | Also, instead of using a tag manager to deploy the {{MINTYDOCSPRODUCT}} tracking snippet, consider placing the tracking snippet directly in the body or header of your website.|}} |
|Status=No | |Status=No | ||
}}{{Section | }}{{Section | ||
− | + | |sectionHeading=Types of tracking snippets and recommendations | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |sectionHeading=Types of tracking snippets | ||
|anchor=TypesofSnippets | |anchor=TypesofSnippets | ||
|alignment=Vertical | |alignment=Vertical | ||
|structuredtext====Website snippet=== | |structuredtext====Website snippet=== | ||
− | The Website snippet provides tracking support to traditional webpages that contain little or no dynamic content. Traditional websites load a new HTML page whenever the | + | The Website snippet provides tracking support to traditional webpages that contain little or no dynamic content. Traditional websites load a new HTML page whenever the visitor navigates to a different URL. To provide tracking support to traditional webpages, the Website snippet calls <tt>{{Link-SomewhereInThisVersion|manual=SDK|topic=Pageview|display text=ac('pageview')}}</tt> each time the web browser loads a new page. |
===SPA snippet=== | ===SPA snippet=== | ||
− | The SPA snippet can track activity on Single Page Applications (SPAs). SPAs load dynamic content on demand without requiring a hard reload of the HTML page. The SPA snippet can also track when | + | The SPA snippet can track activity on Single Page Applications (SPAs). SPAs load dynamic content on demand without requiring a hard reload of the HTML page. The SPA snippet can also track when visitors click relative links, which the Website snippet does not. The SPA snippet works on SPAs such as Angular, React, and Vue.js. For more information about the additional tracking options available with the SPA snippet, see {{Link-AnywhereElse|product=ATC|version=Current|manual=SDK|topic=autotrackURLChange}}. |
− | + | ||
− | + | ===Snippet recommendations=== | |
− | + | {{{!}} class="wikitable" style="font-size: 14px;" | |
− | |||
− | |||
− | |||
{{!}}- | {{!}}- | ||
{{!}}{{!}}'''If you have this type of website...''' | {{!}}{{!}}'''If you have this type of website...''' | ||
Line 90: | Line 89: | ||
|Status=No | |Status=No | ||
}}{{Section | }}{{Section | ||
− | |sectionHeading=Customize how the snippet tracks activity | + | |sectionHeading=Deployment overview |
+ | |anchor=Deploy | ||
+ | |alignment=Horizontal | ||
+ | |Media=Image | ||
+ | |image=GPE_deploy_diagram.png | ||
+ | |structuredtext=#{{Link-SomewhereInThisVersion|manual=AdminGuide|topic=Tracking_snippet#GetSnippet|display text=Copy the snippet.}} | ||
+ | #(Optional) {{Link-SomewhereInThisVersion|manual=AdminGuide|topic=Tracking_snippet#Customize|display text=Customize the snippet.}} | ||
+ | #{{Link-SomewhereInThisVersion|manual=AdminGuide|topic=Tracking_snippet|anchor=DeploySnippet|display text=Deploy the snippet.}} | ||
+ | #{{Link-SomewhereInThisVersion|manual=AdminGuide|topic=Tracking_snippet#VerifySnippet|display text=Verify that the snippet works.}} | ||
+ | #{{Link-SomewhereInThisVersion|manual=AdminGuide|topic=Web_tracking|display text=Configure web tracking.}} | ||
+ | {{NoteFormat|For more information about advanced chat routing, see {{#mintydocs_link:topic=Solution/ChatSolutions|standalone}}.|2}} | ||
+ | |Status=No | ||
+ | }}{{Section | ||
+ | |sectionHeading=(Optional) Customize how the snippet tracks activity | ||
|anchor=Customize | |anchor=Customize | ||
|alignment=Vertical | |alignment=Vertical | ||
− | |structuredtext= | + | |structuredtext=You can customize how the snippet tracks activity on your website. |
− | * | + | *To customize how {{MINTYDOCSPRODUCT}} tracks activity on your website, see {{Link-SomewhereInThisVersion|manual=Event|topic=About_event_tracking}}. |
− | * | + | *To customize the {{MINTYDOCSPRODUCT}} tracking snippet with functions, see the {{Link-SomewhereInThisVersion|manual=SDK}}. |
− | |||
− | |||
|Status=No | |Status=No | ||
}}{{Section | }}{{Section | ||
Line 104: | Line 114: | ||
|anchor=DeploySnippet | |anchor=DeploySnippet | ||
|alignment=Vertical | |alignment=Vertical | ||
− | |structuredtext= | + | |structuredtext====About deploying the snippet=== |
− | + | *Deploy the widgets transport above the location where you deploy the {{MINTYDOCSPRODUCT}} tracking snippet. | |
− | + | *Deploy the {{MINTYDOCSPRODUCT}} tracking snippet on the main window of the website to track. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | *Deploy the {{MINTYDOCSPRODUCT}} tracking snippet on the main window of the website | ||
*Paste the tracking snippet in the head section of the website template page before the closing tag. | *Paste the tracking snippet in the head section of the website template page before the closing tag. | ||
*Do not deploy the tracking snippet in an iframe. | *Do not deploy the tracking snippet in an iframe. | ||
− | + | *The {{MINTYDOCSPRODUCT}} tracking snippet loads JavaScript asynchronously without slowing down page loading. For more information about how the tracking snippet works, see {{Link-SomewhereInThisVersion|manual=SDK|topic=About_the_tracking_snippet}}. | |
− | }}{{ | ||
− | | | ||
− | |||
− | | | ||
− | |||
− | + | ===Deployment instructions=== | |
− | + | {{NoteFormat|{{Link-Standalone|topic=ATC/GPEandWidgets|display text=Deploy the widgets transport}} transport above the location where you deploy the {{MINTYDOCSPRODUCT}} tracking snippet. | |
− | + | |}}After you {{Link-SomewhereInThisVersion|manual=AdminGuide|topic=Tracking_snippet|anchor=GetSnippet|display text=copy the snippet}}, do one of the following: | |
− | + | *To deploy the tracking snippet manually, paste the copied snippet on your website. | |
− | + | *To deploy the tracking snippet using Google Tag Manager, see {{Link-SomewhereInThisVersion|manual=Event|topic=Google_Tag_Manager|anchor=VideoGTMDeploy|display text=Deploy the tracking snippet with Google Tag Manager}}. | |
− | + | *To deploy the tracking snippet using Adobe Launch, see {{Link-AnywhereElse|product=ATC|version=Current|manual=Event|topic=Adobe_Launch}}. | |
− | + | *To deploy the tracking snippet using another tag manager, see the tag manager vendor's instructions. | |
− | | | + | {{NoteFormat| |
− | | | + | uBlock and other ad blocking software is known to block tag managers, in which case the tracking snippet deployed through the tag manager would also be blocked. For more information, see {{Link-SomewhereInThisVersion|manual=AdminGuide|topic=Tracking_snippet|anchor=AdBlockers|display text=Ad blockers}}.|}}<br /> |
− | | | ||
− | | | ||
− | |||
− | |||
|Status=No | |Status=No | ||
}}{{Section | }}{{Section | ||
Line 147: | Line 137: | ||
|anchor=VerifySnippet | |anchor=VerifySnippet | ||
|alignment=Vertical | |alignment=Vertical | ||
− | |structuredtext= | + | |structuredtext=After deploying the tracking snippet, use Live Now to verify that {{MINTYDOCSPRODUCT}} is tracking your website activity. You should see an update every 4-5 seconds. |
− | + | ===Troubleshoot the snippet=== | |
− | + | If the tracking snippet does not work properly when you load your web pages, check the following: | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
*Is the snippet on the correct page? | *Is the snippet on the correct page? | ||
− | *Is the snippet | + | *Is the snippet in the correct place in the page header? |
− | *Are | + | *Are the parameters defined correctly? |
*Are there any typos, missing characters, or extra white space? | *Are there any typos, missing characters, or extra white space? | ||
− | * | + | *Were any characters replaced with their printable equivalents? |
*Is the domain on the list of allowed domains? | *Is the domain on the list of allowed domains? | ||
− | For more suggestions, see {{Link-SomewhereInThisVersion|manual=AdminGuide|topic=Tracking_snippet|anchor= | + | For more suggestions, see {{Link-SomewhereInThisVersion|manual=AdminGuide|topic=Tracking_snippet|anchor=DeploySnippet|display text=about deploying the snippet}}. |
− | + | ||
− | + | ===Error reference=== | |
− | + | {{{!}} class="wikitable" width="865" data-mce-style="height: 266px;" style="height: 266px;" | |
− | |||
− | |||
− | |||
− | |||
{{!}}- | {{!}}- | ||
− | {{!}} style="width: 178.828px;" | + | {{!}} data-mce-style="width: 178.828px;" style="width: 178.828px;"{{!}}'''Error code''' |
− | {{!}} style="width: 660.078px;" | + | {{!}} data-mce-style="width: 660.078px;" style="width: 660.078px;"{{!}}'''Description''' |
{{!}}- | {{!}}- | ||
− | {{!}} style="width: 178.828px;" | + | {{!}} data-mce-style="width: 178.828px;" style="width: 178.828px;"{{!}}403 error |
− | {{!}} style="width: 660.078px;" | + | {{!}} data-mce-style="width: 660.078px;" style="width: 660.078px;"{{!}}Is your domain in the list of {{Link-SomewhereInThisVersion|manual=AdminGuide|topic=Web_tracking|anchor=AllowedDomains|display text=allowed domains}}? |
{{!}}- | {{!}}- | ||
− | {{!}} style="width: 178.828px;" | + | {{!}} data-mce-style="width: 178.828px;" style="width: 178.828px;"{{!}}404 error |
− | {{!}} style="width: 660.078px;" | + | {{!}} data-mce-style="width: 660.078px;" style="width: 660.078px;"{{!}}Is there extra white space in the snippet? |
− | + | '''Note:''' In a URL, white space is encoded as %20. | |
− | '''Note:''' In a URL, white space is encoded as %20. | ||
{{!}}- | {{!}}- | ||
− | {{!}} style="width: 178.828px;" | + | {{!}} data-mce-style="width: 178.828px;" style="width: 178.828px;"{{!}}Bad request |
− | {{!}} style="width: 660.078px;" | + | {{!}} data-mce-style="width: 660.078px;" style="width: 660.078px;"{{!}}Is there extra white space in the snippet? |
− | + | '''Note:''' In a URL, white space is encoded as %20. | |
− | '''Note:''' In a URL, white space is encoded as %20. | ||
{{!}}- | {{!}}- | ||
− | {{!}} style="width: 178.828px;" | + | {{!}} data-mce-style="width: 178.828px;" style="width: 178.828px;"{{!}}Initialization error |
− | {{!}} style="width: 660.078px;" | + | {{!}} data-mce-style="width: 660.078px;" style="width: 660.078px;"{{!}}Are there any of the following in the snippet:<br /> |
*Typos | *Typos | ||
Line 197: | Line 175: | ||
*Dashes and quotes in URLs replaced with printable equivalents<br /> | *Dashes and quotes in URLs replaced with printable equivalents<br /> | ||
{{!}}} | {{!}}} | ||
+ | |Status=No | ||
+ | }}{{Section | ||
+ | |sectionHeading=Call the tracking snippet | ||
+ | |anchor=CallSnippet | ||
+ | |alignment=Vertical | ||
+ | |structuredtext=After the tracking snippet is on your webpages, call it using one of the following: | ||
+ | |||
+ | *If you use the traditional snippet, call <code>ac('init')</code> to initialize the Journey JavaScript SDK. For more information, see {{Link-SomewhereInThisVersion|manual=SDK|topic=Init}}. | ||
+ | *If you use the SPA snippet, use <code>ac('load')</code> to load the '''autotrackUrlChange''' module and initialize the Journey JavaScript SDK. For more information, see {{Link-SomewhereInThisVersion|manual=SDK|topic=Load_modules}} and {{Link-AnywhereElse|product=ATC|version=Current|manual=SDK|topic=autotrackURLChange}}. | ||
+ | |||
+ | After you initialize the Journey JavaScript SDK, Predictive Engagement tracks <code>pageview</code> events when visitors arrive on your webpages. For more information, see {{Link-SomewhereInThisVersion|manual=SDK|topic=Tracking_Methods}}. | ||
+ | |Status=No | ||
+ | }}{{Section | ||
+ | |sectionHeading=Other tracking options | ||
+ | |anchor=OtherOptions | ||
+ | |alignment=Vertical | ||
+ | |structuredtext====Web tracking=== | ||
+ | Use the {{Link-SomewhereInThisVersion|manual=AdminGuide|topic=Web_tracking}} feature to specify the domains to track and configure web-related tracking settings. | ||
+ | |||
+ | ===Custom modules=== | ||
+ | Use a set of {{Link-AnywhereElse|product=ATC|version=Current|manual=SDK|topic=About_modules|display text=modules}} to enhance the functionality that the Journey JavaScript SDK provides. | ||
+ | |||
+ | ===Event tracking with tag managers=== | ||
+ | Use your tag manager to build custom tags and triggers that define how Predictive Engagement tracks activity on your website. For more information, see {{Link-AnywhereElse|product=ATC|version=Current|manual=Event|topic=About_event_tracking}}. | ||
+ | |||
+ | ===Domain and subdomain tracking with cookies=== | ||
+ | Use cookies to track domains and subdomains. For more information, see {{Link-SomewhereInThisVersion|manual=SDK|topic=Cookie_usage}} and {{Link-SomewhereInThisVersion|manual=SDK|topic=Configure_advanced_tracking}}. | ||
|Status=No | |Status=No | ||
}} | }} | ||
}} | }} |
Latest revision as of 21:28, November 9, 2021
Contents
- 1 About the tracking snippets
- 2 Before you begin
- 3 Copy the snippet
- 4 Ad blockers
- 5 Types of tracking snippets and recommendations
- 6 Deployment overview
- 7 (Optional) Customize how the snippet tracks activity
- 8 Deploy the snippet
- 9 Verify that the snippet works
- 10 Call the tracking snippet
- 11 Other tracking options
Learn about Genesys Predictive Engagement's tracking abilities and how you can start tracking visitors on your website.
Prerequisites
- Configure the following permissions in Genesys Cloud CX:
- Journey > Settings > Edit, or View
About the tracking snippets
Customers who want to use web chat must deploy the Predictive Engagement tracking snippet. This snippet deploys Predictive Engagement tracking on your website and also allows you to use the web chat feature.
Genesys Cloud CX customers who want to use web messaging must deploy the Messenger snippet. This snippet deploys Predictive Engagement tracking on your website and also allows you to use the web messaging feature.Before you begin
Read about the type of data that Genesys Predictive Engagement tracks and how to ensure that you track visitor data in a regulatory-compliant manner. Understand the implications of using ad blocking software. Finally, learn how the tracking snippet works and the types of tracking snippets available.
Copy the snippet
Genesys Predictive Engagement provides a tracking snippet that you can copy and paste. Since you are logged in to Genesys Cloud CX, the tracking snippet already contains your organization ID and region.
- Determine which snippet to use.
- In Admin in Genesys Cloud CX, open the Global Settings page and then click the Tracking Snippet tab.
- Copy the tracking snippet.
- Paste the snippet. For more information about where to paste the snippet, see Deploy the snippet.
Ad blockers
Ad blockers are plug-ins or browser extensions that improve page load times and minimize questionable tracking. The majority of ad blockers tested with out-of-the-box settings do not interfere with Genesys Predictive Engagement's tracking capabilities. However, there are a couple considerations if you use uBlock Origin:
- uBlock Origin disables Genesys Predictive Engagement's tracking web beacons; this effectively prevents Genesys Predictive Engagement's tracking capabilities.
- uBlock Origin and uBlock Plus Adblocker block popular tag managers such as Adobe Tag Manager, Google Tag Manager, and more.
Types of tracking snippets and recommendations
Website snippet
The Website snippet provides tracking support to traditional webpages that contain little or no dynamic content. Traditional websites load a new HTML page whenever the visitor navigates to a different URL. To provide tracking support to traditional webpages, the Website snippet calls ac('pageview') each time the web browser loads a new page.
SPA snippet
The SPA snippet can track activity on Single Page Applications (SPAs). SPAs load dynamic content on demand without requiring a hard reload of the HTML page. The SPA snippet can also track when visitors click relative links, which the Website snippet does not. The SPA snippet works on SPAs such as Angular, React, and Vue.js. For more information about the additional tracking options available with the SPA snippet, see autotrackURLChange.
Snippet recommendations
If you have this type of website... | Use this snippet... |
Not sure | SPA |
Mix of traditional and SPA pages | SPA |
Traditional pages only | Website |
Deployment overview
- Copy the snippet.
- (Optional) Customize the snippet.
- Deploy the snippet.
- Verify that the snippet works.
- Configure web tracking.
(Optional) Customize how the snippet tracks activity
You can customize how the snippet tracks activity on your website.
- To customize how Genesys Predictive Engagement tracks activity on your website, see About event tracking with tag managers.
- To customize the Genesys Predictive Engagement tracking snippet with functions, see the Journey JavaScript SDK.
Deploy the snippet
About deploying the snippet
- Deploy the widgets transport above the location where you deploy the Genesys Predictive Engagement tracking snippet.
- Deploy the Genesys Predictive Engagement tracking snippet on the main window of the website to track.
- Paste the tracking snippet in the head section of the website template page before the closing tag.
- Do not deploy the tracking snippet in an iframe.
- The Genesys Predictive Engagement tracking snippet loads JavaScript asynchronously without slowing down page loading. For more information about how the tracking snippet works, see About the tracking snippet.
Deployment instructions
- To deploy the tracking snippet manually, paste the copied snippet on your website.
- To deploy the tracking snippet using Google Tag Manager, see Deploy the tracking snippet with Google Tag Manager.
- To deploy the tracking snippet using Adobe Launch, see Use Adobe Launch with Genesys Predictive Engagement.
- To deploy the tracking snippet using another tag manager, see the tag manager vendor's instructions.
Verify that the snippet works
After deploying the tracking snippet, use Live Now to verify that Genesys Predictive Engagement is tracking your website activity. You should see an update every 4-5 seconds.
Troubleshoot the snippet
If the tracking snippet does not work properly when you load your web pages, check the following:
- Is the snippet on the correct page?
- Is the snippet in the correct place in the page header?
- Are the parameters defined correctly?
- Are there any typos, missing characters, or extra white space?
- Were any characters replaced with their printable equivalents?
- Is the domain on the list of allowed domains?
For more suggestions, see about deploying the snippet.
Error reference
Error code | Description |
403 error | Is your domain in the list of allowed domains? |
404 error | Is there extra white space in the snippet?
Note: In a URL, white space is encoded as %20. |
Bad request | Is there extra white space in the snippet?
Note: In a URL, white space is encoded as %20. |
Initialization error | Are there any of the following in the snippet:
|
Call the tracking snippet
After the tracking snippet is on your webpages, call it using one of the following:
- If you use the traditional snippet, call
ac('init')
to initialize the Journey JavaScript SDK. For more information, see init. - If you use the SPA snippet, use
ac('load')
to load the autotrackUrlChange module and initialize the Journey JavaScript SDK. For more information, see load and autotrackURLChange.
After you initialize the Journey JavaScript SDK, Predictive Engagement tracks pageview
events when visitors arrive on your webpages. For more information, see Tracking methods.
Other tracking options
Web tracking
Use the Web tracking feature to specify the domains to track and configure web-related tracking settings.
Custom modules
Use a set of modules to enhance the functionality that the Journey JavaScript SDK provides.
Event tracking with tag managers
Use your tag manager to build custom tags and triggers that define how Predictive Engagement tracks activity on your website. For more information, see About event tracking with tag managers.
Domain and subdomain tracking with cookies
Use cookies to track domains and subdomains. For more information, see Cookies and Advanced tracking with cookies.