0:01 hello I'm David Casey a Solutions
0:03 engineer at snap today we're going to go
0:05 over how to create install and validate
0:08 the snap pixel on your website the snap
0:10 pixel is a tool that Snapchat provides
0:12 to measure a range of actions that tie
0:14 directly back to your business goals the
0:16 snap pixel's key benefits are they allow
0:18 you to attribute conversions back to
0:20 your ad campaigns to understand their
0:23 true impact create pixel custom
0:25 audiences and lookalike audiences based
0:26 on the specific actions that
0:28 snapchatters have taken while visiting
0:31 your site user real-time insights to
0:32 optimize delivery of your campaigns for
0:34 results that matter most to your
0:36 business and unlock powerful new
0:38 features such as Dynamic product ads to
0:40 get the most out of your snap pixel
0:42 setup there are two important questions
0:44 that you should consider what events do
0:46 I need to pass the events that you
0:47 should pass depend on your business use
0:50 case for example a blog site May benefit
0:52 most from signup events so that they can
0:56 optimize for signups an online retailer
0:58 May benefit the most from a combination
1:01 of page view sign up up ad cart and
1:03 purchase events so that they can
1:05 optimize for purchases and effectively
1:07 leverage Dynamic product ads what
1:09 parameters that I need to pass to each
1:11 event user parameters are always
1:13 required as they are the only way to
1:16 properly attribute an event additional
1:17 parameters are covered in more detail
1:19 later in this video but consider the use
1:22 of each parameter and pick those that
1:25 may be most beneficial for your business
1:26 before we get started let's cover a
1:28 prerequisite this tutorial assumes that
1:30 you've created a Snapchat ad account if
1:31 you still need to set one up please
1:32 refer to the link on the screen and then
1:38 video first let's create a snap pixel by
1:41 going to ads manager selecting pixels
1:44 and then selecting create pixel enter
1:46 your pixel
1:53 create under the ad accounts drop down
2:05 pixel if you are on the events manager
2:08 screen then select new event source and
2:15 web first select the partner integration
2:17 tile and check to see if you're using
2:18 any of the snap integration Partners on
2:21 your website such as Shopify if you are
2:23 then select the respective tile and
2:25 follow the simplified setup
2:27 instructions if you're not using any of
2:30 the listed Partners on your website then
2:33 select cancel select setup pixel and
2:35 select pixel
2:37 code ensure that enable automated
2:39 matching is turned on this feature will
2:41 allow your snap pixel to automatically
2:42 attempt to detect and send snap
2:45 information about your customers keep in
2:46 mind that we will hash information that
2:48 we believe to be emails or phone numbers
2:50 before they're sent to snap in order to
2:59 privacy now hover over the code provid
3:02 Ed in step two and click it to copy it
3:07 clipboard next we're going to go to our
3:09 website's head tag and paste the snap
3:11 pixel code in for now we're not going to
3:14 worry about this user email parameter
3:15 however one important thing to note is
3:18 that you must put this pixel code in the
3:20 head tag of every page that you intend to
3:25 track before we move on let's install
3:27 the snap pixel helper so that we can
3:31 test our events go to the Chrome webs St
3:35 we'll search snap pixel
3:38 helper select snap pixel Helper and
3:40 select add to
3:43 Chrome and then add extension
3:45 additionally please make sure your ad
3:47 blocker is turned off for your website
3:49 before we move on let's validate that
3:51 our page view event is firing properly
3:53 on our website we'll notice that there's
3:55 a red badge with the number one in it on
3:57 the snap pixel helper icon this
3:59 indicates that the pixel received one
4:00 event but there was an issue with it
4:03 let's go ahead and click on the icon
4:04 great so we notice that it did receive
4:06 our page view event however if we expand
4:09 it we'll notice that it states the email
4:11 hash is known to be associated with an
4:14 invalid value this is due to the email
4:16 parameter that we mentioned earlier in
4:19 the video and we'll work on this next if
4:20 the pixel is not firing you will see a
4:23 black and white icon with no badge first
4:24 make sure that your ad blocker is
4:26 disabled and if the issue persists
4:28 double check your setup next we're going
4:30 to start sending proper user email and
4:32 user phone number parameters with our
4:34 page View events as these are high
4:36 priority parameters for matching an
4:38 attribution first we're going to add a
4:40 script tag prior to our snap pixel
4:43 script tag that adds two functions one
4:45 for normalizing email and one for
4:48 normalizing phone according to snap pixel
4:49 pixel
4:51 documentation now we can use these two
4:53 functions to normalize a user email and
4:56 phone number and then pass them to our
5:01 initialization function call
5:08 number like
5:10 so it's important to note that the snap
5:13 pixel SDK will automatically hash these
5:15 values before firing the event however
5:17 you could choose to manually hash them
5:19 yourselves if you choose to do so be
5:21 sure to pass the hash values in the
5:23 appropriate Fields such as user hash
5:26 email and user hashed phone number this
5:28 ensures that the information is not
5:30 hashed twice
5:31 additionally it's important to remember
5:33 that you must always normalize the
5:36 fields prior to hashing them or prior to
5:38 passing them to the snap pixel at SDK
5:40 this ensures that snap can effectively
5:42 match the
5:44 parameters to verify that the snap pixel
5:46 is receiving our newly provided user
5:48 parameters let's run another test so
5:50 we'll jump back on our website and again
5:52 we should see a green badge on the snap
5:55 pixel helper icon we'll click that and
5:57 great we can see that we now have an
5:59 email hash parameter and a phone number hash
6:00 hash
6:02 parameter however before we consider
6:04 this test a success let's ensure that
6:06 we're correctly hashing the parameters
6:10 we'll do this by going to the hash
6:12 calculator and typing in the value that
6:15 we're hashing after normalization so we
6:17 know that our email looks like test
6:21 snap.com go ahead and copy that and I'll
6:25 just bring it over to my code editor
6:29 and paste in the calculated value we'll
6:32 go back to our event copy the email
6:36 hash and paste it right below it and
6:37 fantastic they match so that that is
6:39 being hashed properly let's do the same
6:41 thing for phone
6:43 number so we'll paste in our phone
6:46 number but again after normalization it
6:54 this and we'll copy the
6:56 hash paste it
6:59 here and then go back copy copy the hash
7:03 from the event paste it and those match
7:05 as well so fantastic we know that we are
7:09 now sending the correctly hashed user
7:11 parameters as mentioned during the
7:12 introduction you'll likely benefit from
7:14 passing additional events depending on
7:16 your use case let's run through an
7:18 example of passing a purchase event so
7:20 that we can optimize for Pixel purchases
7:22 be sure to pass purchase events on a web
7:24 page only once per purchase this helps
7:26 to avoid duplicate reporting and ensure
7:28 that your conversion sales and Rass
7:33 one way to track our purchase event
7:35 would be to fire the track call from
7:37 directly within the onclick attribute of
7:47 function and call that function whenever
8:03 and we should now see the number two in
8:05 the green badge on the snap pixel helper
8:07 icon this indicates that the pixel has
8:10 fired two events let's click
8:13 it awesome we see that the snap pixel
8:15 has fired our purchase event with all
8:16 the relevant
8:19 metadata finally let's run through an
8:20 example of how you might pass add to
8:24 cart and signup events for add to cart
8:26 let's add another function on click add
8:28 to cart you'll notice that it's very
8:30 similar to our onclick purchase function
8:32 except for it doesn't have a transaction
8:33 ID because a purchase hasn't actually
8:37 been made and now similarly to onclick
8:40 purchase we will come down and add it to
8:43 the onclick attribute of our add to card
8:46 button for sign up notice that we're on
8:49 a new signup page however we've got the
8:51 same initial tracking code that we had
8:54 on our index again it's important to
8:56 ensure that the tracking code is placed
8:59 on each web page that you want to track
9:00 for our signup event we'll create a
9:02 function to trigger whenever our signup
9:08 submitted and now we'll create a form
9:10 that triggers our submit signup method
9:12 when the form is
9:14 submitted let's dive into verification
9:17 with the pixel helper tool a bit more as
9:18 mentioned previously if you see a red
9:21 badge on the snap pixel helper icon then
9:22 there may be an error with your pixel
9:24 implementation if we click on the snap
9:26 pixel helper icon and expand the event
9:28 with red text then we'll be able to see
9:30 the specific error message let's cover
9:32 some common pixel errors and how you
9:35 might fix them if you see invalid event
9:37 type with the event name double check
9:38 that the events you're trying to track
9:41 come from the list of standard accepted
9:43 events if you see an error referring to
9:45 an invalid hash value double check that
9:47 the value being hashed is correct for
9:49 example you may see invalid email hash
9:51 if we recognize a known placeholder
9:53 email additionally double check that the
10:00 guidance
10:03 as a final verification step we can use
10:05 the event Test tool in Snapchat events
10:08 manager to fully verify our integration
10:10 so let's go to events
10:14 manager we'll click on the test events
10:17 button we'll select our pixel for the
10:20 data source and we'll enter our website
10:34 and then we'll head back to events
10:35 manager to see the events that were
10:39 picked up so we viewed the page once and
10:41 I clicked purchase three
10:45 times we can also view the metadata that