The Audiohook Pixel
This articles covers how to edit the Audiohook pixel for installation. It will cover how to track multiple events, how to verify the pixel is installed correctly in the UI and provide a path to additional resources that can assist you in installing a pixel onto your website.
Pixel Event Tracking
To track one or multiple events and attribute them to your campaigns, you will need to add a "pixel" to your website. The Audiohook Pixel is a 1x1 tracking pixel that uses a standard <img>
tag.
Your Audiohook pixel will look like this (replace values in {{curly braces}}
with the correct values for your implementation):
<img src="https://listen.audiohook.com/{{COMPANY-ID}}/pixel.png?type={{EVENT-TYPE}}&order={{ORDER-ID}}&value={{ORDER-AMOUNT-USD}}" style="display: none;">
📍 Placement Guidance (Important)
For accurate event tracking and proper pixel firing, always insert the <img>
tag within the <body>
section of your webpage. Do not place the pixel inside the <head>
tag, as some browsers may delay or block image loading in that section.
Best practice is to place the pixel near the bottom of your page, just before the closing </body>
tag.
Supported Events
Pageviews
To track “pageviews”, place the pixel on every page you want to track. Set the type
parameter to pageview
. You may remove the order
and value
parameters if they're not needed.
Example:
<img src="https://listen.audiohook.com/{{COMPANY-ID}}/pixel.png?type=pageview" style="display: none;">
Purchases
To track “purchases”, place the pixel on your Order Confirmation or Thank You page. Set the type
parameter to purchase
, and dynamically populate the order
and value
parameters.
Example:
<img src="https://listen.audiohook.com/{{COMPANY-ID}}/pixel.png?type=purchase&order={{ORDER-ID}}&value={{ORDER-AMOUNT-USD}}" style="display: none;">
You can insert this pixel via JavaScript or template logic depending on your CMS or framework.
Custom Event Types (Leads, Bookings, Registrations, etc.)
Audiohook supports additional event types to track other meaningful actions. You can define custom values for the type
parameter such as lead
, booking
, registration
, signup
, etc. Use the most relevant event type name for your funnel or business model.
Example for a lead submission:
<img src="https://listen.audiohook.com/{{COMPANY-ID}}/pixel.png?type=lead" style="display: none;">
Example for a booking:
<img src="https://listen.audiohook.com/{{COMPANY-ID}}/pixel.png?type=booking" style="display: none;">
Example for a registration:
<img src="https://listen.audiohook.com/{{COMPANY-ID}}/pixel.png?type=registration" style="display: none;">
You may also append optional parameters to help with attribution and reporting, such as:
userid={{anonymous_1st_party_user_id}}
session={{current_user_session}}
value={{lead_or_booking_value}}
These parameters are especially useful if your funnel assigns a dollar value to non-purchase actions.
Implementing the Audiohook Pixel via Client-side GET Request
The basic implementation of the Audiohook Pixel is via a client-side GET request. This loads the pixel in the user's browser:
<img src="https://listen.audiohook.com/{{COMPANY-ID}}/pixel.png?type=pageview" style="display: none;">
The Audiohook platform automatically collects:
- Hashed IP address
- User Agent string
- Timestamp
You can also pass optional parameters:
order={{order_id}}
value={{value_of_purchase_usd}}
userid={{anonymous_1st_party_user_id}}
session={{id_or_string_for_current_user_session}}
pageurl={{encoded_url_of_current_page}}
referralurl={{encoded_url_of_previous_page}}
Server-side Implementation via GET Request
You can also fire the pixel server-side. This is common for Order Confirmation pages or server-generated events. You’ll need to include the user’s hashed IP and encoded User Agent string manually.
curl "https://listen.audiohook.com/{{COMPANY-ID}}/pixel.png?ip={{hashed_ip}}&ua={{encoded_user_agent}}&type=pageview"
Ensure the ip
and ua
values correspond to the user (not your server).
Server-side Implementation via POST Request
You can also fire the Audiohook Pixel using a POST
request. Pass parameters in the request body (JSON). This method also requires the user’s hashed IP and encoded User Agent string.
Example:
curl -X POST https://listen.audiohook.com/{{COMPANY-ID}}/pixel.png \
-H "Content-Type: application/json" \
-d '{
"ip_address": "%%hashed_user_ip_address%%",
"ua": "%%user_agent_string%%",
"type": "pageview",
"order": "%%order_id%%",
"value": "%%value_of_purchase_usd%%",
"userid": "%%anonymous_user_id%%",
"session": "%%session_id%%"
}'
Verify if the Audiohook Pixel is installed correctly
1. Login to your Audiohook advertiser account at https://app.audiohook.com. To check pixel events fired click "Pixel"

2. Events can either be displayed as charts or click "Start Pivot" to switch to a table view

3. Drag "Type" into the rows field

4. View the daily breakout by type by clicking the drop down

5. Compare the breakout to what you have for visitors to the pages that have the associated pixel type. Export the data if needed.

6. For purchases or other events with values associated, check that the total number of events and the total value matches the purchase events you show have occurred.

7. Hover over a number when they are large enough to get abbreviated to see the full value

8. Look for errors with the type name and correct or remove pixels to avoid unnecessary signals. In the example below, there is a valid pageview pixel and a pixel that was entered incorrectly

9. Click on the event type in the Chart style view to filter and see details. As seen in this screenshot, the pixel type has since been discontinued and is no longer firing
