Challenging question: How to push to DataLayer for GTM ?

  • Andrea
  • Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
6 years 11 months ago #116242 by Andrea
Hello Tuan, team,

here's a challenging question.

How can I push a value from the form (once the form has been sent) to the DataLayer, so I pick the value from within Google Tag Manager, and record the transaction value ?

In more words:

I submit the form, and the total ticket value to be paid is say, 200 EUR. I want to track this transaction value via Google Tag Manager, therefore I need to setup a tag in Google Tag Manager, that picks this 200 EUR value. To do so, Google Tag Manager inspects the "DataLayer" of the "thank-you" page of Events Booking, and looks for the variable that contains the number '200'.

Now the question is: do we have a way in Events Booking to push such total price variable to the DataLayer ??

I understand this is a bit "special" but I'm sure is of outmost interest to those out there working with Google Ads, GTM and Analytics..

Thanks!!

Andrea.

Visit my page! www.elementotango.it

Please Log in or Create an account to join the conversation.

More
6 years 11 months ago #116245 by Tuan Pham Ngoc
Hi Andrea

I don't know about GTM, so I could not answer this question. In Events Booking -> Configuration, there is a config option called Conversion tracking code . You can put any code you want there and it will be rendered on registration complete page

GTM, I guess is also some kind of javascript code. If so, I guess you can try to put that code into the config option above and check to see whether it works. Some note:

1. If it's javascript code, you will have to wrap that code between <script></script> tags

2. To show amount into that GTM code, you can use [AMOUNT] tag

Tuan

Please Log in or Create an account to join the conversation.

  • Andrea
  • Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
6 years 11 months ago #116248 by Andrea
Hi Tuan, thanks for the reply. Yes I saw that box for the conversion tracking, but is it per event-type, or is it generic for all events into Event Booking ?

I'm asking because in some events you may have certain fields, and not in others, so you should have a conversion tracking code different per event.

Thanks!

Andrea

Visit my page! www.elementotango.it

Please Log in or Create an account to join the conversation.

More
6 years 11 months ago #116249 by Tuan Pham Ngoc
That's unfortunately, used for all events at the moment, not per event setting

Tuan

Please Log in or Create an account to join the conversation.

  • Andrea
  • Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
6 years 11 months ago #116250 by Andrea
Hi Tuan understood, thanks anyway.

regards Andrea.

Visit my page! www.elementotango.it

Please Log in or Create an account to join the conversation.

More
6 years 11 months ago #116251 by Tuan Pham Ngoc
We can easily add it become setting per event if needed. But give me sometime to work on it as right now, I am focus working on other more important improvements

Tuan

Please Log in or Create an account to join the conversation.

  • Andrea
  • Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
6 years 11 months ago #116252 by Andrea
Hi Tuan, sure no problem, I understand no worries.

Thanks!

Andrea.

Visit my page! www.elementotango.it

Please Log in or Create an account to join the conversation.

  • Andrea
  • Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
6 years 11 months ago #116253 by Andrea
Tuan, I'm trying to circumvent the issue, but I need one second of your help:

what is the internal variable name used in the "Thank-you" page, for these 2 elements:

(a) The total amount of the booking
(b) The transaction ID

Many thanks!

Andrea.

Visit my page! www.elementotango.it

Please Log in or Create an account to join the conversation.

  • Andrea
  • Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
6 years 11 months ago #116255 by Andrea
The reason why I'm asking the above, is because I'm using the box to insert conversion tracker code. In there, I need to able to access the (php?) variables that contain the total amount and the transaction id. I'm trying to do that but I'm not succeeding. This is most probably because I'm not very familiari wth php and javascript.

Thanks
AG

Visit my page! www.elementotango.it

Please Log in or Create an account to join the conversation.

More
6 years 11 months ago #116256 by Tuan Pham Ngoc
Just use two tags:

[AMOUNT]
[TRANSACTION_ID]

Just enter these tags into the code you want and it will be replaced with actual value

Tuan

Please Log in or Create an account to join the conversation.

Moderators: Tuan Pham Ngoc