Help Center
How can we help? 👋

Sending Events via JavaScript Pixel

Podscribe's pixel-based attribution matches the IPs of site visitors with those of ad listeners. Here’s our methodology to explain in detail how we do attribution.

 

Below is our guide for getting your custom web tag, adding it your website, and checking that the integration works properly.

Setup Steps

Step 1. Get Your Custom Web Tag Guide:

💡

Skip this step if your agency or publisher has already sent you JavaScript tags! They’ll look like this. The tags they send will link your accounts together. If not, proceed.

To pull your custom web tags from your dashboard:

  1. Hover over the Tag Setup tab on the left-hand side of the page and click on Generate New Tag:
    1. Notion image
  1. Type in the name of the advertiser you need tags for. If there are multiple results, pick the one that seems most legitimate. Usually, the right advertiser has a logo and the simplest name:
    1. Notion image

      Feel free to email adops@podscribe.com if there are multiple advertisers that should be merged or of an advertiser needs a logo.

  1. Copy the Guide Link generated and paste it in an email to the advertiser’s developers:
    1. Notion image

Here’s an example web tag guide.

Step 2. Pick Events to Track:

Choose which events you want Podscribe to track attribution from your podcast ads for.

Visits and purchases are auto-selected in the guide because they’re the ones most commonly used:

 

We recommend adding the visits tag to every page on your site so that we track all podcast listeners who end up on your site, no matter what page they land on. The purchase tag goes on the post-purchase page.

You can use the sign-ups or leads tag to track other things like email signups. You can also add it to one page alone to act as a page-specific visit tag. They’re great for testing a new landing page, or seeing how many podcast listeners sign up for a new newsletter.

Some brands use the tags to track things other than the tag’s namesake. For example, you could use the purchase tag to track … email signups, if that is your primary metric of success. This is all good, as long as you remember which tags map to which events. “Conversions” on Podscribe always refer to purchases.

 
💌
Feel free to reach out to adops@podscribe.com with any questions.
 

Step 3. Copy the Tag, Replace Variables and Put on Your Site

👆

If you use Google Tag Manager (GTM), see this guide for a detailed walk-through!

Some events, specifically the purchase action has macros. You must replace these macros (highlighted below) with your site’s variables for them to work!

 

Each purchase macro is optional, but if included, can help improve accuracy and reporting.

Macro Name
Purpose
hashed_email
Hashed emails are privacy-safe, anonymized emails. If shared, we can match additional purchases to our device graph, typically improving campaign performance 10-20%.
discount_code
If Podscribe receives discount codes, we can report on their usage by show to put all conversion data for the buyer on one dashboard. We can also indicate if a code is leaked if we see most code uses don't come from households exposed to the ad.
order_number
Passing order ID helps us ensure we're not receiving duplicated conversions. We can also report all order IDs that were exposed to the audio ad, along with when and on what show.
value
Sending purchase amount lets us auto-compute ROAS.

You can also track things like num_items_purchased, is_new_customer, is_subscription, and currency - just click the ‘Show More’ button on the page:

Notion image
 

Step 4. Ensure The Tags Are Firing Correctly.

Ensuring that your setup is correct from the start is pivotal for reliable attribution. Attribution can only be reliable if the events being sent to Podscribe are correct. This is critical to check before campaigns start!

Here’s how to confirm all is correct with the integration.

 

Questions?

What pages can I use certain event tags on?

You can use the “signup”, “lead”, or “purchase” events on any page you’d like. For example, if you wanted to measure how many exposed listeners visited a Sign-up page, you could fire the “signup” event on page view. Then, once they completed the form, you could fire the Lead event, passing us the hashed email. We recommend placing the “visit” tag on all pages.

Can I use custom event names? I want to create and track other events besides installs, views, signups, leads, and purchases.

Yes! If the primary 5 events are not adequate, we can track custom, additional events. We can also support re-naming the standard event names on our dashboard to names you’re more familiar with, such as “Account Creation”. To do so, you would simply change the name of the action in your javascript tag from “purchase” or “view” to the custom event name you’d like:

Notion image
Instead of loading the script bundle, can we call a 1x1 image pixel, or pass events server-side, or in batch?

Yes - please see this guide for more.

How do I know which advertiser to pick? There are many that pop up with the name of the advertiser.

Podscribe regularly removes duplicate advertisers, but here are some steps that you can take to ensure you're selecting the right advertiser.

  1. Look up the different advertisers with the same name on Podscribe.
    1. Notion image
      Notion image
  1. Check all of the advertisers one by one. If the logo and website are correct, then that advertiser is likely the correct one.
    1. Notion image

      Select the name displayed on the advertiser page as the advertiser’s name when creating your campaign:

      Notion image

      If you can’t find the advertiser you’re looking for, feel free to reach out to adops@podscribe.com.

What is the Content Security Policy (CSP) for the Podscribe web tag?
Content-Security-Policy:

default-src
self

script-src
d34r8q7sht0t9k.cloudfront.net

connect-src
verifi.podscribe.com
pixel.tapad.com
ipv4.podscribe.com
How to integrate using a Shopify Custom Pixel, instead of the Shopify app, for Shopify stores?

See here for general info on Shopify Custom Pixels, and below for the Podscribe code.

👆

Be sure to replace YOUR_USER_ID and YOUR_ADVERTISER_ID with your IDs.

(function (w, d) { var id = 'podscribe-capture', n = 'script'; var e = d.createElement(n); e.type = 'text/javascript'; e.id = id; e.async = true; e.src = 'https://d34r8q7sht0t9k.cloudfront.net/tag.js'; var s = d.getElementsByTagName(n)[0]; s.parentNode.insertBefore(e, s); e.onload = onLoad; })(window, document); function onLoad() { podscribe('init', { user_id: YOUR_USER_ID, advertiser: YOUR_ADVERTISER_ID }); analytics.subscribe("page_viewed", (event) => { console.log('view', new Date()); console.log('podscribe', window.podscribe()); window.podscribe('view', { source: "shopify-custom" }); }); analytics.subscribe("product_viewed", (event) => { podscribe('ViewContent', { source: "shopify-custom" }); }); analytics.subscribe("search_submitted", (event) => { podscribe('Search', { source: "shopify-custom" }); }); analytics.subscribe("product_added_to_cart", (event) => { podscribe('AddToCart', { currency: event.data?.cartLine?.merchandise?.productVariant?.price?.currencyCode, value: event.data?.cartLine?.merchandise?.productVariant?.price.amount, source: "shopify-custom" }); }); analytics.subscribe("payment_info_submitted", (event) => { podscribe('AddPaymentInfo', { source: "shopify-custom" }); }); } analytics.subscribe("payment_info_submitted", (event) => { w.podscribe('AddPaymentInfo', {source: "shopify-custom"}); }); analytics.subscribe("checkout_started", (event) => { w.podscribe('InitiateCheckout', {source: "shopify-custom"}); }); analytics.subscribe("checkout_completed", (event) => { try { const allDiscountCodes = event.data?.checkout?.discountApplications?.map( (discount) => { if (discount.type === "DISCOUNT_CODE") { return discount.title; } } ); discountCode = allDiscountCodes ? allDiscountCodes.filter(Boolean).join(", ") : undefined; } catch (e) { console.log(e); } w.podscribe('purchase', { value: event.data?.checkout.totalPrice?.amount, currency: event.data?.checkout.totalPrice?.currencyCode, order_number: event.data?.checkout?.order?.id, hashed_email: event.data?.checkout.email, num_items_purchased: event.data?.checkout.lineItems?.length, source: "shopify-custom", discount_code: discountCode }); });

I have a new client! What's the fastest way to get javascript pixels to send them?

It is to generate them from the Tag Setup tab:

Notion image
How important is it to include a hashed email in the pixel? If we do not, what would we lose out on?

Sending us hashed emails lets us find 10-20% more attributed conversions, so it is certainly helpful to have! Here’s further detail on the part that hashed emails play in attribution. If you send us raw emails, we hash them as they come in and only store the hashed ones.

From where can I get the javascript pixels to send a brand?

From the Tag Setup tab - here’s how to generate them.

What mobile device partners (MMPs) does Podscribe work with?

Podscribe works with all major MMPs including: Adjust, Appsflyer, Kochava, Singular, and Segment.

Did this answer your question?
😞
😐
🤩