eTrack Surveys Only Triggered on Page Click

As a customer, you have embedded SMG's site intercept code on your website to activate eTrack when a visitor loads a webpage. However, the eTrack surveys are only firing when the page is clicked, despite having the settings configured to show the survey intercept after a specified duration on the page. The survey is coming up only when there is a click on the page, and sometimes multiple surveys are firing in a single session if your eTrack project has more than one active survey.

SMG eTrack is delivered through a JavaScript library imported into a client's website which places an SMG feedback button on the client's webpage, allowing you to gather feedback surrounding your customer’s digital or E-commerce experience.

 

Resolution When eTrack Intercept is Not Loading Without a Click

The eTrack Feedback Engine (FE) relies on some custom event triggers to present the active survey based on the set targeting criteria which could be a page click or after a website visitor is on a specific page for a given duration.

For cases where the feedback survey is not triggered on a specific page after the specified time (e.g., checkout page), check your JavaScript and confirm that you have not removed the element required to trigger the survey from your custom web page.

Page load events can sometimes be suppressed on Single-page applications (SPA) as these only load a single page and then dynamically rewrite the page with new content fetched from a web server as the user interacts with it instead of loading a new page for every interaction.

Example scenario

For the case where the checkout and checkout-confirmation screens are part of a SPA, there will be no “hard navigation” from one page to the next causing eTrack to fail to detect that the user has moved between pages. The solution, in this case, would be to explicitly invoke the EtrackApi.navigateSPA() call on the confirmation page to notify the eTrack FE that the user is now on a new page which should result in the survey invite logic being reevaluated and the survey displayed. The EtrackApi.navigateSPA() effectively triggers an event that scans the DOM for changes thereby simulating the 'virtual' page change of the SPA application. 

This method will fire the appropriate events, i.e., SMG:etrack:invite-suppressed and SMG:etrack:invite-logic-process which were not triggered normally during the transition from checkout to checkout-confirmation in the SPA, and ultimately this results in the event SMG:etrack:invite-requested being fired when the target conditions are met.

Important

It is recommended to invoke the EtrackApi.navigateSPA() method to perform this function since it was created for this specific use case. While manually firing the SMG:etrack:invite-requested event may work in some scenarios, it is unsupported and not guaranteed to behave the same way in future releases of the eTrack Feedback engine.

 

Was this article helpful?
0 out of 0 found this helpful

Comments

1 comment
  • I don’t know

    0

Please sign in to leave a comment.