Spotify Ads
This is a pro feature. Get the pro version here
Spotify Ads measures campaigns through Spotify Ad Analytics. Its pixel tracks the conversion events Spotify uses for attribution and campaign optimization. Once a pixel ID is configured, the Pixel Manager loads the Spotify pixel and sends all conversion events automatically.
Setup
-
Open Spotify Ad Analytics: https://adanalytics.spotify.com/
-
Browse to Manage > Your Pixels and create a pixel if you don't have one yet
-
Copy the Pixel ID. It is 32 hexadecimal characters and looks similar to this:
3f0a1c7d9e4b42a8b1c6d5e8f2a9b0c3 -
In the Pixel Manager, open Tracking Pixels → Spotify Ads, paste the ID into the Pixel ID field, and save.
That's it. There is no need to manually add the Spotify base code snippet or the event snippets to your site. The Pixel Manager loads the pixel and sends the events automatically.
Why the event names differ from the snippets in your dashboard
Spotify Ad Analytics generates a snippet for every conversion type you set up. For a custom conversion type, that generated snippet is always a lead event with a category naming the type, which is why a snippet you copy for "product_view" or "add_to_cart" looks nothing like what the Pixel Manager sends.
The Pixel Manager sends Spotify's built-in conversion types instead: view, product, addtocart, checkout and purchase. Only the built-in events accept the product and line item fields, and only they have a counterpart in the Conversions API, which is what lets Spotify deduplicate the browser event against the server-side one.
If your account already has custom conversion types with names like product_view or add_to_cart, those will stop filling once the Pixel Manager takes over, and the corresponding built-in types will fill instead. Your historical data in the custom types is not affected.
Conversions API (CAPI)
The Conversions API is an optional addition to your Spotify pixel that sends conversion data to Spotify in real time through Spotify's server-to-server protocol. This provides more accurate conversion tracking, especially for events that might be missed by browser-based tracking due to ad blockers or privacy settings. Purchases are triggered directly by WooCommerce order events, so they are tracked even when the customer never returns to the order confirmation page.
The Pixel Manager sends every event with a shared event ID to both the browser pixel and the Conversions API, so Spotify deduplicates the two channels.
Find more information on the Conversions API in the Spotify Ads API documentation.
-
Open the Spotify Ads Manager: https://ads.spotify.com/
-
Browse to Events > Connect Data Source and choose Conversions API
-
Submit the form. The interface then shows the Connection ID, a UUID
-
Click Generate token to create an access token. Spotify allows up to three active tokens at a time, so delete an old one if you have reached the limit
-
In the Pixel Manager, open Tracking Pixels → Spotify Ads, paste the connection ID into the Conversions API Connection ID field and the token into the Conversions API Token field, and save.
Both values are required. The connection ID is what your conversions are attributed to, and the token on its own cannot identify a data source.
Spotify matches server-side conversions on the hashed email address, and its Conversions API has no click ID to fall back on. The Pixel Manager therefore sends the SHA-256 hashed email address with every Conversions API event once the API is configured, rather than only when Advanced Matching is enabled. Without it Spotify would have nothing to match the conversion against.
The address is hashed before it leaves your server. Spotify receives only the hash, never the plain value.
Testing
Spotify publishes no test event mode for the Conversions API, so there is no test event code field and no way to send events that are excluded from your reporting. Verify your setup in Spotify Ad Analytics under Manage > Your Pixels instead, where incoming conversions are listed.
You can offload Spotify Conversions API calls from your WooCommerce server to the edge using the Server-Side Proxy. This reduces server load and improves tracking accuracy by routing events through a first-party subdomain.
Advanced Matching
With advanced matching enabled, the Pixel Manager sends the SHA-256 hashed email address of logged-in customers and purchasers to Spotify through the pixel's alias event. This improves Spotify's ability to match visitors, which increases match rates and attribution accuracy.
The alias is sent when the pixel loads, and again on the order confirmation page, because a guest customer's email address only becomes known once the order exists.
All personal data is hashed before it leaves your server. Spotify receives only the hashes, never the plain values.
You can enable advanced matching in the Spotify Ads advanced settings section of the Pixel Manager.
Supported Events
The Pixel Manager sends these Spotify events:
- view: sent on every page.
- product: sent on product detail pages, with the product details.
- addtocart: sent when a product is added to the cart, with the product details, price and quantity.
- checkout: sent when the checkout is started, with the cart value and its line items.
- purchase: sent when an order is placed, with the order ID, order value, discount code, new-customer flag and all purchased items.
- lead: sent by the
[conversion-pixel]shortcode, for lead forms and other conversions outside the shop funnel.
Here's a list of supported events.
The Conversions API carries fewer fields than the browser pixel: Spotify accepts only the currency, the amount, a content name and a content category server-side, with no order ID and no line items. The full basket is on the browser event.
Spotify matches the product IDs in the tracking events against your product catalog in Spotify. Make sure the product identifier setting in the Pixel Manager matches the IDs in the catalog you submitted to Spotify.