Extension Code: Snapchat integration steps

  1. Go to Intercart > More > Integrations: Extension Code
  2. Click and view "Extension Code developer guides and samples"
  3. Check disclaimer "I have read Intercart Extension developer guides and understand the risks of Extension code."
  4. Click "Change"

   5. Replace YOUR_SNAPCHAT_UID, paste code and click Save.

The below sample tracks "Start Checkout" and "Purchase" events:

(function(e,t,n){if(e.snaptr)return;var a=e.snaptr=function()
{a.handleRequest?a.handleRequest.apply(a,arguments):a.queue.push(arguments)};
a.queue=[];var s='script';r=t.createElement(s);r.async=!0;
r.src=n;var u=t.getElementsByTagName(s)[0];
u.parentNode.insertBefore(r,u);})(window,document,
'https://sc-static.net/scevent.min.js');

snaptr('init', 'YOUR_SNAPCHAT_UID');

itc.addEventHandler('InitiateCheckout', function(payload, additional) {
snaptr('track', 'PAGE_VIEW');
snaptr('track', 'START_CHECKOUT');
});

itc.addEventHandler('Purchase', function(payload, additional) {
snaptr('track', 'PURCHASE', {
currency: payload.currency,
price: additional.total,
transaction_id: additional.transaction_id
});
});


 6. Verify by placing a test checkout using Funnel > Preview

References:
https://businesshelp.snapchat.com/en-US/article/purchase-event

---

Did this answer your question?