diff --git a/template.tpl b/template.tpl index f1b6333..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", @@ -374,6 +384,7 @@ function bootstrapFn() { } function bootstrap() { + var existingSnaptr = copyFromWindow('snaptr'); var snaptr = bootstrapFn(); createQueue('snaptr.queue'); setInWindow('snaptr.sendPixelByGTM', sendPixel, true); @@ -387,8 +398,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();