How to Implement Voucher Code Pixel Tracking
This article will cover the following:
- Creating voucher codes in CAKE and linking them to offers
- Generating the voucher code pixel with dynamic parameters
- Ensuring the offer ID is correctly passed in the pixel URL
- Testing the pixel with the Pixel Log and troubleshooting missing values
- Reporting voucher code usage in the Voucher Code report
Creating voucher codes in CAKE and linking them to offers
Voucher codes are created in the Voucher Codes module. Follow these steps:
- Navigate to Tracking → Voucher Codes.
- Click Add New Voucher Code.
- Enter a descriptive Code Name (e.g., SPRING2024).
- Select the Offer you want the code to be associated with. This links the voucher to the offer ID that will be used later in the pixel.
- Set the Status to Active and save.
Tip: Use a naming convention that includes the campaign name and date (e.g., SUMMER23_Q2) to make reporting easier.
Generating the voucher code pixel with dynamic parameters
The voucher code pixel is a simple 1×1 image request that CAKE uses to capture the code and related data. Use the following URL template:
<img src="https://yourdomain.com/pixel?vc={voucher_code}&offer_id={offer_id}&click_id={click_id}" width="1" height="1" alt="" />
Replace the placeholders with the dynamic tokens provided by CAKE:
- {voucher_code} – the actual voucher code value passed from the landing page.
- {offer_id} – the internal CAKE offer identifier (see Section 3).
- {click_id} – the click identifier that ties the conversion back to the original click.
If you are using a third‑party landing page, ensure the URL parameters are correctly mapped to the tokens above before rendering the pixel.
Ensuring the offer ID is correctly passed in the pixel URL
The offer_id must match the ID of the offer you linked to the voucher code in Section 1. To retrieve the correct ID:
- Go to Offers → All Offers.
- Hover over the desired offer; the URL in the browser will contain
offer_id=XXXXX. Copy that numeric value. - Insert the value into the pixel URL or, if you are using a dynamic token, use
{offer_id}which CAKE automatically substitutes.
When the pixel fires, you should see a request similar to:
GET /pixel?vc=SPRING2024&offer_id=12345&click_id=abcde12345 HTTP/1.1
Host: yourdomain.com
If the offer_id is missing or incorrect, the voucher will not be attributed in CAKE reports.
Testing the pixel with the Pixel Log and troubleshooting missing values
CAKE provides a built‑in Pixel Log to verify that your pixel fires and that all parameters are captured.
- Navigate to Tracking → Pixel Log.
- Set the date range to include the test conversion.
- Filter by Pixel Name if you have multiple pixels.
- Locate the most recent entry and verify that
vc,offer_id, andclick_idare present.
Common issues and fixes:
- Missing vc value – Ensure the landing page is appending the voucher code to the URL (e.g.,
?vc=SPRING2024) before the pixel fires. - Incorrect offer_id – Double‑check the offer ID used in the pixel matches the linked offer.
- No click_id – Verify that the click tracking script (
cake.js) is present on the page where the voucher code is generated.
Reporting voucher code usage in the Voucher Code report
If you have any questions, please reach out to your dedicated CAKE Client Success Manager/Account Manager or contact the CAKE Support Team at support@getCAKE.com.