Step-by-step guide to install the Spotify Pixel via Floodlight tags
Applies to: Brands and Agencies
Due to the nature of img pixels, Spotify Ad Analytics is unable to provide assistance with the QA or troubleshooting of an img pixel implementation.
Floodlight tags operate inside of iFrames and require the use of img pixels. Before beginning, refer to the limitations here.
When implementing the Spotify Pixel via Floodlight tags, Spotify Ad Analytics is not able to set a first-party cookie. Spotify Ad Analytics does not use third-party cookies, and requires the use of image pixels for Floodlight/iFrame implementation. Be sure to input your pixel ID/key into the script before installing it. You can learn how to access your Spotify Pixel ID here.
Macros
You will need to update the following HTML code with your pixel id and any value information for a purchase and lead events. A finished example would look like:
<img height="1" width="1" style="display:none" src="https://img.byspotify.com/?key=123456&a=init" />
Page View
<img height="1" width="1" style="display:none" src="https://img.byspotify.com?key={Pixel_ID}&a=init" />
You may also use the following code to measure additional events.
Product
A user viewed a product:
<img height="1" width="1" style="display:none" src="https://img.byspotify.com?key={Pixel_ID}&a=product" />
Add to Cart
A user added a product to the cart:
<img height="1" width="1" style="display:none" src="https://img.byspotify.com?key={Pixel_ID}&a=addtocart" />
Checkout
A user initiated a checkout:
<img height="1" width="1" style="display:none" src="https://img.byspotify.com?key={Pixel_ID}&a=checkout" />
Purchase
A user purchased products:
<img height="1" width="1" style="display:none" src="https://img.byspotify.com?key=(Pixel_ID}&value={value}&order_id={order_id}&discount_code={discount_code}&currency={ISO_currency}&a=purchase" />
Lead
A user filled out a contact form or signed up for your service:
<img height="1" width="1" style="display:none" src="https://img.byspotify.com?key=(Pixel_ID}&type={lead_type}&category={lead_category}&value={value}&currency={ISO_currency}&a=lead" />