Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revisionLast revisionBoth sides next revision | ||
facebook-pixel-and-fresh8 [2022/11/23 14:54] – [Purchase] evaldas-luksys | facebook-pixel-and-fresh8 [2024/04/11 12:08] – [Triggers] evaldas-luksys | ||
---|---|---|---|
Line 8: | Line 8: | ||
Other events are optional, but the more are added, the better result can be achieved. | Other events are optional, but the more are added, the better result can be achieved. | ||
+ | |||
+ | Please note, javascript code snippets in the screenshots were added just for display purposes. The correct code snippets are next to the screenshots and these should be pasted in Google Tag Manager. | ||
====== Custom variables ====== | ====== Custom variables ====== | ||
- | In some code snippets we use < | + | In some code snippets we use < |
+ | |||
+ | For custom variable list please read Custom variables section. | ||
====== Triggers ====== | ====== Triggers ====== | ||
Some of the Tags are using triggers. Trigger is basically and event sent from our app. We need to create a trigger for each event, and then those triggers are assigned to Tags. | Some of the Tags are using triggers. Trigger is basically and event sent from our app. We need to create a trigger for each event, and then those triggers are assigned to Tags. | ||
+ | |||
+ | For trigger list please read triggers section. | ||
====== GTM Tags ====== | ====== GTM Tags ====== | ||
Line 65: | Line 71: | ||
var url = ' | var url = ' | ||
var ids = new Request(url); | var ids = new Request(url); | ||
- | fetch(ids).then(function(res) { | + | fetch(ids) |
+ | | ||
return res.json(); | return res.json(); | ||
- | | + | |
- | fbq(' | + | fbq(' |
- | }); | + | |
+ | | ||
+ | | ||
+ | | ||
+ | }) | ||
+ | // When user uses ad blocker, request throws unhandled error. Catch prevents this. | ||
+ | .catch(function() {}); | ||
</ | </ | ||
</ | </ | ||
Line 116: | Line 129: | ||
{{: | {{: | ||
+ | |||
+ | Code snippet below. Please replace currency ' | ||
< | < | ||
< | < | ||
fbq(" | fbq(" | ||
- | currency: | + | currency: |
value: 0, | value: 0, | ||
external_id: | external_id: | ||
Line 126: | Line 141: | ||
</ | </ | ||
</ | </ | ||
- | |||
==== Purchase ==== | ==== Purchase ==== | ||
{{: | {{: | ||
+ | |||
+ | Please replace currency with your own. | ||
< | < | ||
Line 145: | Line 161: | ||
content_type: | content_type: | ||
content_ids: | content_ids: | ||
- | currency: | + | currency: |
value: {{Amount}} | value: {{Amount}} | ||
}); | }); | ||
Line 167: | Line 183: | ||
{{: | {{: | ||
+ | |||
+ | Please replace currency with your own. | ||
< | < | ||
< | < | ||
fbq(" | fbq(" | ||
- | currency: | + | currency: |
external_id: | external_id: | ||
value: {{Amount}} | value: {{Amount}} | ||
Line 181: | Line 199: | ||
{{: | {{: | ||
+ | |||
+ | Please replace currency with your own. | ||
< | < | ||
Line 186: | Line 206: | ||
fbq(" | fbq(" | ||
value: {{Amount}}, | value: {{Amount}}, | ||
- | currency: | + | currency: |
external_id: | external_id: | ||
}); | }); | ||
Line 213: | Line 233: | ||
{{: | {{: | ||
- | ==== {{Currency}} ==== | ||
- | {{: | ||
==== {{user ID}} ==== | ==== {{user ID}} ==== | ||
Line 221: | Line 239: | ||
==== {{Amount}} ==== | ==== {{Amount}} ==== | ||
{{: | {{: | ||
+ | |||
+ | ==== {{depositsCount}} ==== | ||
+ | {{: | ||
+ | |||
+ | ==== More information about other possible data layer variables can be found here ==== | ||
+ | https:// | ||
====== Triggers ====== | ====== Triggers ====== | ||
+ | Bare in mind, that event names in the screenshot might be out of date. For up to date event names please visit this page: https:// | ||
==== Pageview ==== | ==== Pageview ==== | ||
Line 250: | Line 275: | ||
{{: | {{: | ||
+ | |||
+ | ==== Add to slip event ==== | ||
+ | |||
+ | {{: |