Hello! i have a lead gen campaign i am about to launch on Snapchat, after going through a number of ads being submitted and rejected, now i hae the ads and landers which have been approved i am ready to run my actual conversion campaigns.
I am having some problems with the Pixel.
If you know how to solve this problem please let me know!
So the pixel code looks like this:
<!-- Snap Pixel Code -->
<script type='text/javascript'>
(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', '4af636aa-cfab-4f33-9f9c-beee52825b68', {
'user_email': '__INSERT_USER_EMAIL__'
});
snaptr('track', 'PAGE_VIEW');
</script>
<!-- End Snap Pixel Code -->
In the
'user_email': '__INSERT_USER_EMAIL__' section, we need to replace it with the correct parameter.
I followed the business center guide and changed it to
'user_email': user.email
});
This should be correct, however when i check my Lander using the Snap Pixel helper, it says there is no pixe on the page.
If you know how to solve this issue, please do let me know,
Thanks
STB
You are going to dynamically add the email address with server side code or javascript on the client side.
At this point the pixel code is looking for a javascript script "user" object with an 'email' property name which most likely doesn't exist.
Note: you usually won't have an email until the lead is generated so you can do the following during the initial init
snaptr('init', '4af636aa-cfab-4f33-9f9c-beee52825b68', {'user_email': ''});
This sets a blank email
hi thanks, but that is what i have already done and the issue is that the Pixel Helper is saying there is no pixel being fired. But when i put it back to the default code without the email variable, it shows the pixel. this is the issue.
snaptr('init', '4af636aa-cfab-4f33-9f9c-beee52825b68',{'user_email', user.email});
snaptr('init', '4af636aa-cfab-4f33-9f9c-beee52825b68');
snaptr('init', '4af636aa-cfab-4f33-9f9c-beee52825b68',{'user_email': ''});
snaptr('init', '4af636aa-cfab-4f33-9f9c-beee52825b68', {'user_email': '__INSERT_USER_EMAIL__'});
