Piano VX and Google Analytics Integration

At Piano, we know our publishers value data on their customer's behavior to make informed enhancements to their digital properties. Publishers will be able to integrate their Google Analytics account into VX to collect data for the checkout in a publisher's site. 

Analytics events

Publishers will be able to track events within the VX checkout process such as:

  • When a offer is first shown
  • When a term is selected
  • When a user goes backs to the start of the checkout
  • When a promotion is valid
  • When a promotion is invalid
  • When a receipt is displayed
  • When a publisher login is required
  • When the VX login is required
  • When the VX login screen is displayed
  • When the VX registration screen is displayed

The actual event titles are as follows:

  • showOffer
  • termSelected
  • checkoutRestarted
  • promoApplied
  • promoInvalid
  • receiptDisplayed
  • publisherLoginRequired
  • loginRequired
  • loginDisplayed
  • registerDisplayed
  • loginSuccess
  • loginFailed
  • registrationFailed
  • registrationSuccess
  • checkoutSuccess

Integrating Google Analytics in VX

Here, you can view a quick video of how a publisher could implement Google Analytics into VX:


Step by step instructions on integrating Google Analytics:

  1. On the VX dashboard, click “Edit Business.”
  2. Once on the “Edit Business” screen, scroll down to “Google Analytics” field.
  3. Click into field and paste in the Google Analytics tracking ID (tracking ID is accessible through Google analytics).
  4. Click “Save.”

Cross domain tracking

Since piano templates load in iframes - user goes through different domains and could lose their browsing session through Google analytics. To prevent that - you can pass Google analytics client id into the template with the following JavaScript code:

// Get tp object
tp = window.tp || [];
// Get client id from google analytics
var clientId = ga.getAll()[0].get('clientId');
// Set client id
tp.push(['setGAClientId', clientId]);