If you haven't already, please read the Google Analytics Integration Overview guide and link your Persosa account to Google Analytics.

Initialize Plugin

To initialize the Persosa Google Analytics plugin, insert the following code after Google Analytics has sent a pageview:

persosa('ga', 'analytics');

Your full Google Analytics code should look something like this:


ga('create', 'YA-XXXXX-Y', 'auto');
ga('send', 'pageview');

persosa('ga', 'analytics');

NOTE: Ensure that the Persosa tracking snippet is loaded on the page before initializing analytics.js

What does this code do?

After ensuring that Persosa is linked to your Google Analytics account and checking for the existence of the ga() function on the page, the tracking code will fire off a non-interaction Google Analytics "Experience" event in the "Persosa" category, passing the custom dimension values with it.

The full even that's fired off looks something like this:

ga('send', 'event', 'Persosa', 'Experience', '<Experience Name>', {
  nonInteraction: true,
  dimension<Index>: '<Experience ID>',
  dimension<Index>: '<Experience Name>'
Did this answer your question?