facebook-pixel-via-gtm-integration

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
facebook-pixel-via-gtm-integration [2023/12/12 10:13] – [Custom variables] evaldas-luksysfacebook-pixel-via-gtm-integration [2024/04/24 11:48] (current) – [Triggers] evaldas-luksys
Line 14: Line 14:
 In this case we: In this case we:
   * Named the new variable as **User ID**   * Named the new variable as **User ID**
-  * Variable type should be **Data Layer Variable**+  * Chose the Variable type to be **Data Layer Variable**
   * Data Layer Variable Name is **userID**   * Data Layer Variable Name is **userID**
  
Line 31: Line 31:
  
  
 +----
 +
 +
 +Additionally, we need to create a constant variable for the currency.
 +
 +{{:online:gtm:facebook-pixel:currency_variable.jpg|}}
 +
 +This variable will be used to send your currency to FB pixel with some events. Please make sure to replace 'EUR' currency with your own.
 +
 +Supported currencies can be found here: https://developers.facebook.com/docs/marketing-api/currencies
 ===== Triggers ===== ===== Triggers =====
 The triggers we'll be implementing: Dom Ready, Add To Betting Slip, Bets (main wallet), Deposit, FTD, Registration. The triggers we'll be implementing: Dom Ready, Add To Betting Slip, Bets (main wallet), Deposit, FTD, Registration.
Line 37: Line 47:
   * Event names (e.g. depositSuccess, registrationFinished, ...)   * Event names (e.g. depositSuccess, registrationFinished, ...)
   * Correctly added previously created variables and their value comparisons, e.g. FTD trigger.   * Correctly added previously created variables and their value comparisons, e.g. FTD trigger.
 +  * Event names might have slightly changed, so please check for the up to date documentation - https://wiki.advbet.com/admin/online-platform-cms/google-events?s[]=gtm&s[]=events#events-and-their-data-gtm.
  
 Let's implement these triggers according to the screenshots: Let's implement these triggers according to the screenshots:
Line 79: Line 90:
  
 Please make sure to use the same settings for tags when implementing, otherwise the FB pixel might not properly work. Please make sure to use the same settings for tags when implementing, otherwise the FB pixel might not properly work.
 +
 +**When adding scripts to tags, please do not use ones from the screenshots as they might not be correct. Please copy the correct code snippets from the below screenshots (code blocks).**
  
 ==== Install FB Pixel ==== ==== Install FB Pixel ====
Line 155: Line 168:
 <script> <script>
   fbq("track", "CompleteRegistration", {   fbq("track", "CompleteRegistration", {
-    currency: 'EUR',+    currency: {{Currency}},
     external_id: {{user ID}},     external_id: {{user ID}},
     value: {{Amount}}      value: {{Amount}} 
Line 172: Line 185:
   fbq("trackCustom", "Subscribe", {   fbq("trackCustom", "Subscribe", {
     value: {{Amount}},     value: {{Amount}},
-    currency: 'EUR',+    currency: {{Currency}},
     external_id: {{user ID}}     external_id: {{user ID}}
   });   });
Line 187: Line 200:
 <script> <script>
 fbq("track", "Lead", { fbq("track", "Lead", {
-  currency: 'EUR',+  currency: {{Currency}},
   value: 0,   value: 0,
   external_id: {{user ID}},   external_id: {{user ID}},
  • facebook-pixel-via-gtm-integration.1702376000.txt.gz
  • Last modified: 2023/12/12 10:13
  • by evaldas-luksys