What data is sent and when
The decision for a client to be part of the “original” group or the “optimized” group is stored for seven days unless the user deletes the data from localstorage or is using incognito mode which prevents the data from being kept.
The DataMilk JS code picks the “original” or “optimized” group at the very beginning of a new session as soon as the first page loads before the user interacts with the site and reports the choice made on Google Analytics on every page-view.
Any session in the “original” group will see the original site without any modifications. Any session in the ”optimized” group may see Smart Components bit is not guaranteed to.
How do we identify your GA and send data to it?
We look at the code loaded on the page and check for the following code in particular:
- The DataMilk JS code looks for window['ga'] OR window[window['GoogleAnalyticsObject']]
- We then pull your GA account id based on the GA code on your page
- And upload non interaction events with event label “original” or “optimized” with event category “DataMilk” on every pageviews
- Customers now have the option to tell DataMilk which trackingId to use.
How do I see if DataMilk can identify my GA?
Note: to debug the events to Google Analytics we recommend installing the Google Analytics Debugger Extension for Chrome.
Open the page in Inspect mode and click on the Google Analytics Debugger Extension to enable it.
Screenshot of example site illustrating inspector with Google Analytics debugger in the off state.
Checking Google Analytics Events from DataMilk
Screenshot of example site illustrating a Google Analytics Event for the case of original.
As can be seen in the screenshot above the Google Analytics Event has nonInteraction set to 1 so that it doesn't disrupt other analysis of user behavior.
This event is sent for every page-view. Subsequent reloads on the same client will show the same eventLabel as the client stores it for seven days.
The probability of getting original or optimized for eventLabel depends on how the domain is configured. As of this writing, Tok&Stok was configured for 50% so if one reloads the page on incognito (or clear the data for the site) the chance of getting one label or the other should be 50%.
The following screenshot illustrates the case for optimized.
Screenshot of example site illustrating a Google Analytics Event for the case of optimized.