online:send-ga-events-via-gtm

Bare in mind, this is just an example of how we could set up these events. You can use any other naming conventions when setting up the events in GTM. Full list of events that we send to GTM, with their data, can be found here: https://wiki.advbet.com/admin/online-platform-cms/google-events?s[]=slipbuy

Setting up the GTM events flow to GA

  1. Need to set up variables (see Data layer variables set up section)
  2. Set up the triggers (see Set up triggers section)
  3. Set up tags (see Set up tags section)

Data layer variables set up

These Data layer variables are used to pass data that comes from our app and are mapped within the GTM ecosystem to pass data to GA.

Action

Category

Label

Value

Content view name

*This data layer value allows to track pageviews in GA

To set up a trigger, we need to use the event name from the Events section. This is how login event looks after we finish the set up:

To receive all events from our app, we need to create triggers for all events from the Events table.

Routing trigger

Additionally to all triggers, we can set up routing trigger, to track pageviews in GA. The set up for this trigger should look like this:

All of the events mentioned in Events section should be set up according to the example below:

slipBuy event tag example

The event according to the table in the Events section sends Category, Action and Label data. So in this case:

  1. Choose Tag Type, which in our case is Google Analytics
  2. We pick Category, Action and Label Data Layer Variables and insert them into the Event Tracking Parameters section.
  3. Use
    {{ Google Analytics Settings }}

    in Google Analytics Settings sections

  4. Assign previously created 'Slip buy' event trigger (as seen in the screenshot above, Triggering section)

* Tag data should be set up according to the Events table. For instance, if event does not send Label data, we should leave Label field empty. Same goes for other fields.

Example of how we map custom variables with Tag fields

Once the tag is created correctly, it should start sending data to Google Analytics.

Router tag is set up a bit differently from other events, and the tag set up should look like the one below:

Event name Category Action Label Value
registrationInit YES YES NO NO
registrationConfirmationKey YES YES NO NO
registrationFinished YES YES NO NO
login YES YES NO NO
logout YES YES NO NO
slipBuy YES YES YES NO
depositSuccess YES YES YES YES
withdrawalSuccess YES YES YES YES
myAccountMenuDepositButtonClick YES YES YES YES
  • online/send-ga-events-via-gtm.txt
  • Last modified: 2023/12/04 13:45
  • by evaldas-luksys