Skip to content

Instantly share code, notes, and snippets.

@andrewpye
Created April 27, 2021 12:55
Show Gist options
  • Save andrewpye/af92c2c196c538023f699f57a7641885 to your computer and use it in GitHub Desktop.
Save andrewpye/af92c2c196c538023f699f57a7641885 to your computer and use it in GitHub Desktop.
Smile.io <> VWO integration issues

Code setup

We have this as the body of our app: image

Notes:

  • ${script} is where the content of our React app gets rendered;
  • ${asyncTrackingScript} is the script snippet copied from VWO UI;
  • if we place ${asyncTrackingScript} in the expected place in the DOM (i.e. just before the </head> tag), our app goes into an infinite loop of closing and reopening the widget we render (possibly due to our app setup).

Our VWOTracker component looks like this: image

Sample session in Chrome

vwo-session-chrome

This session is visible in the recorded sessions area of the VWO UI 👍

Sample session in Firefox (with enhanced tracking protection disabled)

vwo-session-firefox

Note that:

  • there is a CORS warning visible in the console which is coming from a request to one of our own internal services and should not have any impact on the behaviour of VWO;
  • there is an info log in the console that seems to be coming from VWO code reporting an error;
  • there are 2 requests to GET https://dev.visualwebsiteoptimizer.com/e.gif that fail with a 414 - URI too long error. This seems to be caused by trying to send an entire call stack as a query parameter called s - perhaps logging the call stack from the error logged to the console described in the previous point?

The session does not appear in the VWO UI.

Goal settings in VWO

image

Goal not being met despite visiting the target (virtual) URL

We have 1 unique visitor from the Chrome session included above: image

However, that visit has not been considered as a conversion, as we would expect it to given the goal settings: image

It does however appear as the only result visible if we click the View recordings button for visitors who did not convert: image

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment