How can we help?

Ask a question or search our knowledge base:

 

 

Using the JavaScript snippet in a Single Page App

If you have a single page app, begin by installing the JavaScript snippet as outlined in our documentation and add the following logic to your code:

 

function sendPageView() {
_sift.push(['_trackPageview']);
}

 

As users navigate your site, you can fire the snippet after each URL change with the function above. 

When you don't have or know the user's id, set the value to the empty string. If it's possible for an employee to log in as ("spoof") a customer, do not fire the JS snippet for those events.

Have more questions? Submit a request