Show Article: Google Analytics in the Booking Process
1. Embedding Google Analytics Snippet
Open the Website Integration app. On the right side under "Tracking" you will find fields for analytics integration. Various services can be integrated here. For Google Analytics the following snippet can be inserted in the field "Tracking code on booking":
<script> if (!Cookies.get('disable-ga', {path: ''})) { (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-XXXXXXXX-X', 'auto'); ga('set', 'anonymizeIp', true); ga('send', 'pageview'); } </script>
The call corresponds to the example integration of Google Analytics, but an additional request for a cookie to block tracking has been added. This is necessary for legal reasons. The corresponding tracking code must of course still be supplemented.
2. Opt-Out Cookies
The following can be inserted in the "Opt-Out-Cookies" field:
{ "disable-ga": "Google Analytics" }
This allows you to disable Google Analytics tracking by setting a cookie with the name "disable-ga" under "Privacy". We have queried this in the tracking code.
3. Conversion Tracking
If the order completion is also to be logged, the following snippet can be inserted in the field "Conversion code on booking":
<script type="text/javascript"> /* <![CDATA[ */ if (!Cookies.get('disable-ga', {path: ''})) { var google_conversion_id = xxxxxxxxx; var google_conversion_language = "en"; var google_conversion_format = "X"; var google_conversion_color = "ffffff"; var google_conversion_label = "XXXXXXXXXXXXXXXXXXX"; var google_conversion_value = rfConversion.netPrice; var google_conversion_currency = "EUR"; var google_remarketing_only = false; } /* ]]> */ </script> <script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js"> </script>
The exact meaning of the parameter can be found in the corresponding documentation provided by Google.
Continue reading: Google Tag ManagerVideo Tutorials
First Steps - rentingforce academyEingabe der Preise, Extras und Rabatte
Website Integration Center
I forgot my password
Support Team
support@rentingforce.com