Shopify Integration
Track page views and purchases with our Shopify app. No need to mess with javascript tags — complete the integration in just a few clicks!
You can find the right name of the advertiser and user id to enter into the Shopify app from your custom web tag guide:
If you don’t have your custom web tag guide, you can either a) pull one from your dash or b) ask someone with access to Podscribe for it.
To pull your web tag guide from the dash:
- Hover over to Tag Setup on the left-hand side of the page and click on Generate New Tag:
- 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:
Feel free to email adops@podscribe.com if there are multiple advertisers that should be merged or of an advertiser needs a logo.
- Click on Preview to open the tag page:
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:
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.
- Look up the different advertisers with the same name on Podscribe.
- Check all of the advertisers one by one. If the logo and website are correct, then that advertiser is likely the correct one.
Select the name displayed on the advertiser page as the advertiser’s name when creating your campaign:
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:
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.