3 Technical eCommerce Hacks for Marketers in 2024

Based on our experience auditing clients, here are a few easy to implement technical hacks.

The concept is simple - you're an eCommerce Marketer and need some easy wins to help fight against hyperinflation, decreasing ad budgets, and other challenges. All the tips mentioned here can be implemented quickly, providing pretty good returns for your time.

Sync your ad vendors with your MAP

MAPs (marketing automation platforms) like Klaviyo are crazy powerful - yet most of us only scratch the surface regarding their capabilities. One of the coolest MAP features is adding a webhook to your flow. A webhook allows you to take data from your MAP and send it anywhere! While you can already sync audiences with built-in integrations (like Meta), webhooks allow you to add users to a custom audience or even trigger events based on the user's action in a flow (like when they open an email).

Setup a Meta Developer Account

First, if you've never used a Meta marketing API, follow the steps under “Before you start” to create your account.

Create Your Custom Audience

Next, create the custom audience list and name it under the audiences tab of Business Manager. When you create your audience, select the “upload customer list” option, select a list without customer value, and then select ”Paste comma-separated values" on the “Add customer list” screen. Copy and paste the following values from below into the “Paste comma-separated-values” field:

email
example@domain.com

Give your audience a name, for example, “Welcome Series Clicks,” then upload the information and confirm the audience creation. Once your audience is created, select the “Columns” filter at the top right of your audience view to add a column showing “Audience IDs.” This is where you can find the Audience ID of the audience you just finished creating.

Setup the Webhook in Klaviyo

Next, back in Klaviyo, create a webhook step in the flow with the action you want to send to Meta. On the webhook step, add the following to the destination URL. Make sure to replace <CUSTOM_AUDIENCE_ID> with the ID of your audience.

https://graph.facebook.com/v16.0/<CUSTOM_AUDIENCE_ID>/users

Next, in the headers section, add a key titled “Authorization.” Copy and paste the following value, replacing <ACCESS_TOKEN> with the access token you got from setting up the marketing API in step 1.

Bearer <ACCESS_TOKEN>

Finally, add this code to the “JSON Body” section in Klaviyo of your webhook step in Klaviyo.

{
	"payload": {
		"schema": ["EMAIL"],
		"data":[
			["{{ person.email }}"]
		]
	}
}

And that's it! To verify everything is working, click preview webhook to send a test request to Facebook. I'd recommend selecting test profile for this to prevent adding irrelevant people to your list. Check back on the audience tab in business manager, click on your custom audience, and navigate to the “history” tab. If you see new activity, it worked!

This same concept can be applied in many unique ways; you can trigger based on many different events and even send conversion actions to optimize ads (instead of audiences). This also doesn't need to be Meta or Klaviyo; you can do the same with many different vendors and MAPs; make sure to tweak these steps based on their documentation.

Improve your ad tracking with Cloudflare Zaraz

Setting up conversion APIs for your ad channels is essential in 2023. However, there's still no clear or easy way to do it. Cloudflare Zaraz makes the process incredibly simple; my full implementation guide is here.

Once you have Cloudflare Zaraz implemented, you can set up server-side tracking for your ad events!

An example is installing the Meta Conversions API in a way that functions exactly like the Meta Pixel. Here are my steps:

  • On your website, create a script that generates an FBC parameter and sends it to Zaraz. Here's an example of mine:
<script>
let fbc = '';
const params = new URLSearchParams(document.location.search);
let fbclid = params.get("fbclid");
if (fbclid) {
   let currentTime = Date.now();
   let unixTime = Math.floor(currenttime);
   fbc = `fb.1.${unixTime}.${fbclid}`;
   zaraz.set("fbc",fbc);
}
async function 
</script>
  • Use zaraz.set() functions where applicable to send user data as variables to Zaraz.
  • Go back to the Zaraz interface and add the Facebook Destination.
  • Once it's created, select an event you want to edit (e.g., Pageview) and add the following fields;
    • Prebuilt fields for customer data:
      • E.g. Email → Click on Track Property and type in “Email” (or whatever you named your email property).
    • Custom fields with the following values:
      • client_ip_address → Set it equal to “Device IP address”
      • client_user-agent → Set it equal to "User-agent string"
      • fbc → Click on Track Property and type in “fbc”.

This setup effectively fulfills three things that the Meta Pixel needs:

  • Conversions API is an fbp parameter, a special browser ID set by the pixel, from compiling using IP address & User Agent.
  • Zaraz stores the "fbc' parameter, which is the click ID of a Facebook Ad, across user sessions - no cookies needed!
  • You're providing additional customer data that can be used for Customer Match, and it will persist across that user's sessions because of Zaraz - effectively, it's like a userID cookie.

This setup can give you a 10/10 event score without ever having the Meta Pixel installed on your website!

Link product feed SKUs to event SKUs

Listen, I know Product Feeds are confusing (thanks, Google), but it's 2023 - how much can we feign ignorance on the subject?

Well, this isn't going to be a guide on how to set them up properly (that's coming in the future). Instead, it's going to be a tip on a very common problem I see on my product feed audits:

The SKU on the feed ≠ the SKU being passed in website events.

This is especially common in Shopify stores, where some implementations pass a “Shopify ID” instead of the SKU. Even if the SKUs are the same, sometimes the data type is all mismatched. 

This can also happen when a SKU only contains numbers, and you use a spreadsheet for your feed. The event from your pixel will count it as a string (text) value, and the spreadsheet will often default to an integer (number) value. So they might look the same, but they're completely different!

This is super important to fix because you can't run dynamic product retargeting ads on most ad platforms that support it (e.g., Meta, TikTok, Pinterest). Unfortunately, most long-term fixes involve changing either A) the pixel code, B) the code that generates the product feed, or C) both. Here's a bandaid solution to fix this ASAP:

  1. Create a spreadsheet with 2 Columns:
    1. event_sku - The ID of an item coming from a pixel event.
    2. feed_sku - The ID of an item in the product feed.
  2. Proceed to fill out the rows by matching every event_sku to every feed_sku.
    1. You can batch-export all of your event SKUs using an analytics tool like GA.
    2. If there are a ton of SKUs, try using a formula to automatically match them (e.g., using product URL and lookups?)
  3. Download this new .csv, and upload it as a “supplemental field” in the ad platform of choice.
    1. You can also do this in tools like Datafeedwatch to avoid creating a supplemental feed for each platform.
  4. Create a new rule that does the following:
    1. Matches a product in the main feed to the supplemental feed by indexing the feed_sku column
    2. Replaces the value in the main feed with the value of the event_sku 

This approach works by replacing the value of an ID in your main feed with the ID coming from the pixel event. You don't need to edit the website code to change the IDs passed into the events.

Now again, this isn't a perfect solution. Any changes in SKUs of your main feed (e.g., new variants, new schema, or even new products) will need to be manually updated in your supplemental feed. But this is a quick hack to get your ads running until you can figure out a solution.