From 86d47899118a557ab3dcb5529fab2ac02f14f828 Mon Sep 17 00:00:00 2001 From: Ryan Green Date: Tue, 17 Dec 2024 11:51:11 -0600 Subject: [PATCH 1/3] Prevent duplicate loads of Pixel JS --- template.tpl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/template.tpl b/template.tpl index f1b6333..b7ff8a9 100644 --- a/template.tpl +++ b/template.tpl @@ -374,6 +374,7 @@ function bootstrapFn() { } function bootstrap() { + var existingSnaptr = copyFromWindow('snaptr'); var snaptr = bootstrapFn(); createQueue('snaptr.queue'); setInWindow('snaptr.sendPixelByGTM', sendPixel, true); @@ -387,8 +388,10 @@ function bootstrap() { snaptr('init', initData.pixel_id, initData); snaptr('track', initData.pixel_id, initData.event_type, data); - var url = 'https://sc-static.net/scevent.min.js'; - injectScript(url, data.gtmOnSuccess, data.gtmOnFailure, url); + if (!existingSnaptr) { + var url = 'https://sc-static.net/scevent.min.js'; + injectScript(url, data.gtmOnSuccess, data.gtmOnFailure, url); + } } bootstrap(); From 13afd68e956e55472af75f5ce13f7fafada500da Mon Sep 17 00:00:00 2001 From: Ryan Green Date: Thu, 2 Jan 2025 09:36:22 -0600 Subject: [PATCH 2/3] Add support for variables for first and last name parameters --- template.tpl | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/template.tpl b/template.tpl index b7ff8a9..1a6dfdc 100644 --- a/template.tpl +++ b/template.tpl @@ -206,6 +206,16 @@ ___TEMPLATE_PARAMETERS___ "displayName": "User Hashed Phone Number (SHA-256)", "name": "user_hashed_phone_number", "type": "TEXT" + }, + { + "displayName": "User First Name", + "name": "firstname", + "type": "TEXT" + }, + { + "displayName": "User Last Name", + "name": "lastname", + "type": "TEXT" }, { "displayName": "User Mobile Ad ID", From 1d80f5685ebc85e9b3f1b23040455cbf6576e48f Mon Sep 17 00:00:00 2001 From: Ryan Green Date: Mon, 13 Jan 2025 15:28:04 -0600 Subject: [PATCH 3/3] Add client deduplication id support --- template.tpl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/template.tpl b/template.tpl index 1a6dfdc..7642fe0 100644 --- a/template.tpl +++ b/template.tpl @@ -277,6 +277,11 @@ ___TEMPLATE_PARAMETERS___ "name": "sign_up_method", "type": "TEXT" }, + { + "displayName": "Client Deduplication ID", + "name": "client_dedup_id", + "type": "TEXT" + }, { "notSetText": "Not Applicable", "macrosInSelect": true,