Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

This article explains how you can track greenback user behaviour within your own Google Analytics (GA) reports.

🚀 4 easy steps

  1. Contact your Custogmer Success representative to turn on your ‘data layer’ greenback events

  2. Create custom variables to pass data layer values into your Google Tag Manager (GTM)

  3. Create custom tags in your GTM to pass the data to your GA

  4. Create the custom variables in your GA4 to use them in your reports

This guide covers passing all of the available greenback events into your GA, however you can choose to pass only the ones you need

(tick) Step 1: Check the data layer is turned on

After your CS rep has confirmed this is now activated, open up Google Chrome browser:

  • Visit your website page where greenback is loaded, e.g.

  • Interact with widget

  • When you have done some interaction, right-click > Inspect (or Ctrl+Shift+I) to open the Chrome Developer tools console

  • Choose the Console tab, type dataLayer (it’s case sensitive!) and hit Enter, you will now see the fired events:

  • Depending on what action you performed you will see preezie events fired (full details) for:

    • greenback.view - fired everytime greenback widget is loaded

    • greenback.opened - fired everytime someone opened chat window

    • greenback.1stMessageSent - fired everytime someone sent a first message

    • greenback.productRecommended - fired everytime products are recommended

    • greenback.productClick - fired everytime someone clicks on a product

    • greenback.addToCart - fired if someone adds a product to the cart from the widget

    • greenback.closed - fired when someone closed the widget

You’re now ready to join this custom data to your GA using GTM.


🖇️ Step 2: Pass greenback data into Google Tag Manager (GTM)

2a. Create the GTM Data Layer Variables

This will allow any GTM tags to use the preezie data variables (as GA4 parameters) in various ways.

First go to your GTM account:

  1. Variables > User-Defined Variables > New

  2. Give it a name of greenback.visitorId

  3. Click Variable Configuration > Data Layer Variable

  1. In Data Layer Variable Name enter greenback.visitorId hit Save

  • Repeat these 4 steps to create the other 7 data layer variables needed:

Variable name (8 Data Layer Variables)

Data Layer Variable Name

What it captures

greenback.visitorId

preezie.trigger

How the journey was triggered (note, workflow = embedded)

greenback.sessionId

preezie.workflow

The name of the journey

greenback.page

preezie.selector

The name of the journey connector (aka a workflow selector)

greenback.message

preezie.ref

The short version of the question

greenback.products(array)

preezie.answer

The text of each answer the user gives

preezie.productid

preezie.product.unique

The unique id of the clicked product in the results (as defined by your product feed attributes in the preezie CMS)

preezie.position

preezie.product.position

The position the clicked product was ranked in the recommendation results

preezie.productname

preezie.product.name

The name of the product that was clicked on.

Note, you can add/change if you have other product attributes you need as shown in your data layer, e.g. price:

  • Now to join the above to Data Layer events, repeat the above steps 5 times but instead use variable type Custom Event - just ensure the variable names match these below:

Variable name (Custom Event)

What it captures

preezie.load

When the widget loads

preezie.click

An answer click

preezie.completed

A completion click

preezie.resultclick

A click on a product recommendation

preezie.email

If an email address was captured at the end of the journey

You now have your new variables, they should look like this:

image-20240202-061121.png
  • No labels