Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Click Id Override #4

Merged
merged 2 commits into from
Jun 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions metadata.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
homepage: "https://stape.io/"
versions:
- sha: 5c9555f534a50c64cec537e69686fc4c5a11e1a6
changeNotes: Added Click Id Override support.
- sha: dd6d17a977aa103f3fb75b91ea35014264b72b90
changeNotes: Remove Merchant Id field.
- sha: 1114da3e8baecc8bcc47414190bcafa9e0ef3f14
Expand Down
2 changes: 1 addition & 1 deletion template.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ if (data.type === 'page_view') {

data.gtmOnSuccess();
} else {
const clickId = getCookieValues('taboola_cid')[0] || '';
const clickId = data.clickId || getCookieValues('taboola_cid')[0] || '';

if (!clickId) {
data.gtmOnSuccess();
Expand Down
9 changes: 8 additions & 1 deletion template.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,13 @@ ___TEMPLATE_PARAMETERS___
"displayName": "Currency Code",
"simpleValueType": true,
"help": "The value must be a 3-letter currency code per ISO standard (e.g., \"GBP\")."
},
{
"type": "TEXT",
"name": "clickId",
"displayName": "Click Id Override (Optional)",
"simpleValueType": true,
"help": "\u003cb\u003etaboola_cid\u003c/b\u003e - cookie will be used by default"
}
],
"enablingConditions": [
Expand Down Expand Up @@ -211,7 +218,7 @@ if (data.type === 'page_view') {

data.gtmOnSuccess();
} else {
const clickId = getCookieValues('taboola_cid')[0] || '';
const clickId = data.clickId || getCookieValues('taboola_cid')[0] || '';

if (!clickId) {
data.gtmOnSuccess();
Expand Down
Loading