Home > Paid Traffic Sources >

Snapchat Pixel Help! (5)


09-01-2020 07:13 PM #1 stbmagic (Member)
Snapchat Pixel Help!

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




09-02-2020 12:17 AM #2 Mr Baffoe (Veteran Member)

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


09-02-2020 08:49 PM #3 stbmagic (Member)

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.


09-03-2020 01:50 AM #4 Mr Baffoe (Veteran Member)

Quote Originally Posted by stbmagic View Post
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.
Please double check, I'm pretty sure you didn't already do what I said to try.

This won't work
Code:
snaptr('init', '4af636aa-cfab-4f33-9f9c-beee52825b68',{'user_email', user.email});
Any of the following will work, I prefer the first two below. In terms of code, it more valid:
Code:
snaptr('init', '4af636aa-cfab-4f33-9f9c-beee52825b68');
Code:
snaptr('init', '4af636aa-cfab-4f33-9f9c-beee52825b68',{'user_email': ''});
This is the default code, and works just fine as is if you don't have an email address to pass in.
Code:
snaptr('init', '4af636aa-cfab-4f33-9f9c-beee52825b68', {'user_email': '__INSERT_USER_EMAIL__'});


09-03-2020 03:36 AM #5 stbmagic (Member)

Quote Originally Posted by Mr Baffoe View Post
Please double check, I'm pretty sure you didn't already do what I said to try.

This won't work
Code:
snaptr('init', '4af636aa-cfab-4f33-9f9c-beee52825b68',{'user_email', user.email});
Any of the following will work, I prefer the first two below. In terms of code, it more valid:
Code:
snaptr('init', '4af636aa-cfab-4f33-9f9c-beee52825b68');
Code:
snaptr('init', '4af636aa-cfab-4f33-9f9c-beee52825b68',{'user_email': ''});
This is the default code, and works just fine as is if you don't have an email address to pass in.
Code:
snaptr('init', '4af636aa-cfab-4f33-9f9c-beee52825b68', {'user_email': '__INSERT_USER_EMAIL__'});
Thanks again, i am following what they show here https://v2uploads.zopim.io/4/a/j/4aj...e668fbe544.png

it says it needs to be entered as:

snaptr('init', '4af636aa-cfab-4f33-9f9c-beee52825b68', {'user_email': user.email});

the ones you gave me, show this error

Click image for larger version. 

Name:	Screenshot 2020-09-03 at 04.38.41.png 
Views:	11 
Size:	93.2 KB 
ID:	24126

however when i implement it the way it says in the snapchat business center, the pixel helper shows this

Click image for larger version. 

Name:	Screenshot 2020-09-03 at 05.05.20.png 
Views:	10 
Size:	52.7 KB 
ID:	24127


Home > Paid Traffic Sources >