Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
facebook-pixel-and-fresh8 [2022/11/23 14:53] – evaldas-luksys | facebook-pixel-and-fresh8 [2024/04/11 12:09] (current) – [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 138: | Line 154: | ||
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(' |
content_type: | content_type: | ||
content_ids: | content_ids: | ||
- | currency: | + | currency: |
value: {{Amount}} | value: {{Amount}} | ||
- | | + | |
- | }); | + | }) |
+ | // When user uses ad blocker, request throws unhandled error. Catch prevents this. | ||
+ | .catch(function() {}); | ||
</ | </ | ||
</ | </ | ||
Line 164: | Line 183: | ||
{{: | {{: | ||
+ | |||
+ | Please replace currency with your own. | ||
< | < | ||
< | < | ||
fbq(" | fbq(" | ||
- | currency: | + | currency: |
external_id: | external_id: | ||
value: {{Amount}} | value: {{Amount}} | ||
Line 178: | Line 199: | ||
{{: | {{: | ||
+ | |||
+ | Please replace currency with your own. | ||
< | < | ||
Line 183: | Line 206: | ||
fbq(" | fbq(" | ||
value: {{Amount}}, | value: {{Amount}}, | ||
- | currency: | + | currency: |
external_id: | external_id: | ||
}); | }); | ||
Line 210: | Line 233: | ||
{{: | {{: | ||
- | ==== {{Currency}} ==== | ||
- | {{: | ||
==== {{user ID}} ==== | ==== {{user ID}} ==== | ||
Line 218: | 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 screenshots might be out of date. For up to date event names please visit this page: https:// | ||
==== Pageview ==== | ==== Pageview ==== | ||
Line 247: | Line 275: | ||
{{: | {{: | ||
+ | |||
+ | ==== Add to slip event ==== | ||
+ | |||
+ | {{: |