There are many reasons why copying and pasting our JavaScript code may not work as intended. This guide will highlight the most common issues that arise and how to address them.
- Common issues
- Troubleshooting first steps
- Troubleshooting Regular Page View Event
- Troubleshooting Item Page View Event
- Troubleshooting Add to Cart Event
- Troubleshooting Checkout Success Event
- Troubleshooting Search Event
- Troubleshooting Email Capture Event
If you are still unable to resolve your issue please reach out to help@retentionscience.com, or to your team.email@retentionscience.com (provided by ReSci).
Common issues
- JavaScript is pointing to the incorrect DOM element.
- Conflicts with existing page code.
- Data discrepancy from your system to what the JS event is capturing.
Troubleshooting first steps
- Navigate to the webpage you are troubleshooting and open your browser developer tools to the "Network" tab.
- Filter for the relevant user event "wave", and refresh the page to verify that the JS is firing correctly to capture relevant user interaction events. (Example gif above shows this process a page view event as
"action":"view"
) - Click on the "wave" that was fired and verify the relevant wave metadata matches the acceptance criteria for each event (listed in the respective sections below).
- If no wave was fired, review the code to check for possible conflicts and to verify if the correct global parameters, event-specific parameters, and DOM elements were referenced as needed.
Troubleshooting Regular Page View Event
What is the Regular Page View Event?
Regular Page View sample data
Acceptance criteria:
- This event should be fired when a user views any webpage (such as your homepage).
- Find out more information on the regular page view event.
- When you load the page, is an event action (wave) being fired correctly?
- See Troubleshooting First Steps above for details.
- Is the metadata for the page view event accurate (event-specific fields listed below)?
action
– should be listed asview
Troubleshooting Item Page View Event
What is the Item Page View Event?
Item Page View sample data
Acceptance criteria:
- This event should be fired when a user views an item details webpage.
- Find out more information on the item page view event.
- When you load the item page, is an event action being fired correctly?
- See Troubleshooting First Steps above for details.
- Is the metadata for the item page view event accurate (event-specific fields listed below)?
action
– should be listed asview
items
– should list theid
of the item(s) on the page and match therecord_id
being sent to ReSci via the items flat file.- If there is a discrepancy here, you will first want to ensure that the data you are sending us is accurately reflected (i.e. the
record_id
for this item is being sent accurately to ReSci)
- If there is a discrepancy here, you will first want to ensure that the data you are sending us is accurately reflected (i.e. the
Troubleshooting Add to Cart Event
What is the Add to Cart Event?
Add to Cart sample data
Acceptance criteria:
- This event should be fired when a user adds an item(s) to their cart and should display the item
record_id
(s),name
,price
, etc.
- Find out more information on the add to cart event.
- When you click add to cart, is an event action being fired correctly?
- See Troubleshooting First Steps above for details.
- Is the metadata for the add to cart event accurate (event-specific fields listed below)?
action
– should be listed asshopping_cart
items
– should list theid
of the item(s) on the page and match therecord_id
for those items in your database, thename
of the item, and theprice
of the item.- These fields should match the corresponding fields on the items data you are sending to ReSci.
- If there is a discrepancy here, you will first want to ensure that the data you are sending us is accurately reflected (i.e. the
record_id
for this item is being sent accurately to ReSci)
Troubleshooting Checkout Success Event
What is the Checkout Success Event?
Checkout Success sample data
Acceptance criteria:
- This event should be fired when a user checks out successfully after placing an order and should display the item
record_id
(s),name
,price
, etc.
- Find out more information on the checkout success event.
- When you load the checkout success page, is an event action being fired correctly?
- See Troubleshooting First Steps above for details.
- Is the metadata for the item page view event accurate (event-specific fields listed below)?
action
– should be listed ascheckout_success
items
– should list theid
of the item(s) on the page and match therecord_id
for those items in your database, thename
of the item, and theprice
of the item.- These fields should match the corresponding fields on the items data you are sending to ReSci.
- If there is a discrepancy here, you will first want to ensure that the data you are sending us is accurately reflected (i.e. the
record_id
for this item is being sent accurately to ReSci)
Troubleshooting Search Event
What is the Search Event?
Search Event sample data
Acceptance criteria:
- This event should be fired when a user completes a search on your website. The event "wave" should display the search terms the user entered (displayed as
"params":{"terms":"searchterm"}
. Theaction
should be listed assearch
.
- Find out more information on the search event.
- When you complete a search on site, is an event action being fired correctly?
- See Troubleshooting First Steps above for details.
- Is the metadata for the item page view event accurate (event-specific fields listed below)?
action
– should be listed assearch
params
– should list theterm
(s) the user searched for.
Troubleshooting Email Capture Event
What is the Email Capture Event?
Email Capture sample data
Acceptance criteria:
- This event should be fired when a user enters their email into a form such as an email newsletter sign-up, or a pop-up form. The event "wave" should display the
email
of the user, as well as theuser_properties
that are associated with that user, such asrecord_id
,email
,registration_source
, etc. Theaction
should be listed asemail_entered
.
- Find out more information on the email capture event.
- When you enter an email into the email capture form, is an event action being fired correctly?
- See Troubleshooting First Steps above for details.
- Is the metadata for the email capture event accurate (event-specific fields listed below)?
action
– should be listed asemail_entered
user_properties
– should list therecord_id
of the user signing up via email and match therecord_id
for that user in your database, theemail
of the user, and theregistration_source
from where the user signed up.- If there is a discrepancy here, you will first want to ensure that the data you are sending us is accurately reflected (i.e. the
record_id
for this item is being sent accurately to ReSci)
Comments
0 comments
Please sign in to leave a comment.