Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
facebook-pixel-via-gtm-integration [2023/12/12 10:11] – [Tags] evaldas-luksys | facebook-pixel-via-gtm-integration [2024/04/24 11:48] (current) – [Triggers] evaldas-luksys | ||
---|---|---|---|
Line 3: | Line 3: | ||
In this example we'll need to set up GTM custom variables, triggers and tags. This will allow us submitting the required data to FB pixel. | In this example we'll need to set up GTM custom variables, triggers and tags. This will allow us submitting the required data to FB pixel. | ||
- | Bare in mind, this is an example of the FB pixel set up and your final set up might be different (depends on your goals). | + | Bare in mind, this is an example of the FB pixel set up and your final set up might differ. |
===== Custom variables ===== | ===== Custom variables ===== | ||
Line 12: | Line 12: | ||
{{: | {{: | ||
- | In this case we can see that, we: | + | In this case we: |
* Named the new variable as **User ID** | * Named the new variable as **User ID** | ||
- | * Variable type should | + | * Chose the Variable type to be **Data Layer Variable** |
- | * Data Layer Variable Name is userID | + | * Data Layer Variable Name is **userID** |
The most important part here is the Data Layer Variable Name, since this piece of data will be coming from our app and so we need to enter this key correctly. | The most important part here is the Data Layer Variable Name, since this piece of data will be coming from our app and so we need to enter this key correctly. | ||
Line 31: | Line 31: | ||
+ | ---- | ||
+ | |||
+ | |||
+ | Additionally, | ||
+ | |||
+ | {{: | ||
+ | |||
+ | This variable will be used to send your currency to FB pixel with some events. Please make sure to replace ' | ||
+ | |||
+ | Supported currencies can be found here: https:// | ||
===== Triggers ===== | ===== Triggers ===== | ||
The triggers we'll be implementing: | The triggers we'll be implementing: | ||
Line 37: | Line 47: | ||
* Event names (e.g. depositSuccess, | * Event names (e.g. depositSuccess, | ||
* Correctly added previously created variables and their value comparisons, | * Correctly added previously created variables and their value comparisons, | ||
+ | * Event names might have slightly changed, so please check for the up to date documentation - https:// | ||
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, | Please make sure to use the same settings for tags when implementing, | ||
+ | |||
+ | **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: | ||
< | < | ||
fbq(" | fbq(" | ||
- | currency: | + | currency: |
external_id: | external_id: | ||
value: {{Amount}} | value: {{Amount}} | ||
Line 172: | Line 185: | ||
fbq(" | fbq(" | ||
value: {{Amount}}, | value: {{Amount}}, | ||
- | currency: | + | currency: |
external_id: | external_id: | ||
}); | }); | ||
Line 187: | Line 200: | ||
< | < | ||
fbq(" | fbq(" | ||
- | currency: | + | currency: |
value: 0, | value: 0, | ||
external_id: | external_id: |