Most affiliate pixels follow a straightforward pattern: fire a tag on the confirmation page, pass the order value and transaction ID, done. Rakuten is more involved than that. The pixel relies on a specific set of variables being correctly defined and available at the point of firing — and if any one of them is missing, wrong, or unavailable at the right moment, the conversion either doesn't register in Rakuten's reporting or registers incorrectly.

The problem is that most of these failures are silent. GTM shows the tag fired. The network request goes out. GA4 records the purchase event. Everything looks correct — until you check Rakuten's reporting and the conversions aren't there, or the order values are wrong, or the same transaction is being counted multiple times.

This guide is structured around the dependency chain — because understanding what relies on what is what makes troubleshooting possible.

The dependency chain

Before touching any GTM configuration, it's worth mapping out what depends on what. Rakuten affiliate tracking in a server-side GTM setup involves five layers, and each one is a potential point of failure.

1. Rakuten variables correctly defined in web GTM

The Rakuten site ID, affiliate ID, and order variables must be defined as GTM variables before they can be referenced by any tag. If these aren't correctly set up — particularly the Rakuten site ID — nothing downstream will work. This is the most common point of failure and the one that's hardest to diagnose because the tag can appear to fire while passing null or undefined values.

Most common failure point — check here first

2. Data layer populated before tags fire

The order values — transaction ID, revenue, currency, items — need to be pushed to the data layer before the GTM tags that read them fire. If the data layer push happens after the tag fires, GTM reads undefined values. This is a timing problem, not a configuration problem, but it produces identical symptoms.

3. GA4 purchase event fires with correct parameters

The GA4 purchase event needs to include transaction_id, value, currency, and the items array. These parameters are what the server-side container reads to construct the Rakuten conversion request. Missing or malformed parameters here propagate directly to the Rakuten pixel.

4. Server-side container receives and parses the GA4 event

The server-side GTM container needs to receive the GA4 event payload and correctly identify the GA4 client. If the measurement ID isn't correctly configured or the request routing isn't set up, the event never reaches the server container.

5. Rakuten tag fires from server container with correct variables

The Rakuten pixel tag in the server container reads the event data and constructs the conversion request. If the variables from steps 1–4 are all correct, this step works. If any upstream step has a problem, this step fires with wrong or missing data — or doesn't fire at all.

The most important thing to internalise before troubleshooting: check the chain from the top down, not the bottom up. Most intermediate users start by checking the Rakuten tag in the server container. The problem is almost always in web GTM — specifically the variable configuration — which is step one.

Web GTM setup

01
Web GTM · Critical
Define the Rakuten variables

This is the step most implementations get wrong. Before creating any tags, define the following as GTM variables. These need to be available at the time the confirmation page loads — not after an async call completes.

Variables you need to define

  1. Rakuten Site ID — found in your Rakuten affiliate dashboard. Create a GTM Constant variable named Rakuten - Site ID and paste the value directly. Do not read this from the data layer — it's a fixed value per account.
  2. Transaction ID — the unique order identifier. Should come from the data layer: ecommerce.transaction_id. Create a Data Layer Variable pointing to this path.
  3. Order Revenue — the order total Rakuten should receive. Typically ecommerce.value from the data layer. Confirm whether Rakuten expects the value including or excluding tax for your account — this varies by merchant agreement.
  4. Currency — ISO 4217 code (e.g. USD, EUR). Should match the currency passed to GA4.
The most common mistake: attempting to read the Rakuten Site ID from the data layer or a page variable rather than defining it as a constant. The site ID doesn't change — it's a fixed account identifier. Define it as a GTM Constant. If it's being read dynamically and the value isn't present on the confirmation page at the moment the tag fires, GTM will pass an empty string or undefined to the Rakuten pixel — and the conversion will not register.
02
Web GTM · Data layer
Confirm data layer timing

The data layer push containing your order data must happen before the GTM tags that read it fire. On most e-commerce platforms, the confirmation page loads the order data synchronously — but on some implementations (particularly headless or SPA setups), the order data is fetched asynchronously after the page loads.

In GTM preview mode on the confirmation page, check the Events tab in the left panel. The dataLayer push containing ecommerce data should appear before the purchase event and before your Rakuten tag fires. If the purchase event fires first and the ecommerce push comes after, your tags are reading empty values.

If the timing is wrong

The fix depends on the platform. For most setups, the data layer push needs to move earlier in the page load sequence — ideally synchronously in the page <head> before the GTM snippet. On SPA or headless setups, you may need to trigger the GTM tags on a custom event that fires after the order data is confirmed to be available, rather than on Page View.

03
Web GTM · GA4
Configure the GA4 purchase event with all required parameters

The GA4 purchase event is what carries the order data from the browser to the server-side container. The server-side Rakuten tag reads its values from this event — so whatever parameters are missing or malformed here will be missing or malformed in the Rakuten conversion request.

The GA4 purchase event must include all of the following:

// Required parameters for GA4 purchase event
{
  "event": "purchase",
  "ecommerce": {
    "transaction_id": "ORDER-12345",     // string, unique per order
    "value": 49.99,                      // number, not string
    "currency": "USD",                   // ISO 4217 — not "$" or "£"
    "items": [{
      "item_id": "SKU-001",
      "item_name": "Product Name",
      "price": 49.99,
      "quantity": 1
    }]
  }
}

Common parameter errors that will silently break the Rakuten conversion: value passed as a string ("49.99" instead of 49.99), currency passed as a symbol rather than an ISO code, transaction_id not unique per order, or the items array being empty.

Server-side GTM setup

04
Server-side GTM · Container
Verify the GA4 client is receiving events

Before configuring the Rakuten tag in the server container, confirm that the server-side container is actually receiving GA4 events from the browser. In your server-side GTM container, go to Preview mode and trigger a purchase on the site. You should see the purchase event appear in the server-side preview stream with the full event data.

If no events are appearing in the server-side preview, the problem is the routing from web GTM to the server container — not the Rakuten configuration. Check that the GA4 tag in your web container is sending to your server-side container URL rather than directly to www.google-analytics.com. The transport URL in the web GTM GA4 configuration tag should point to your server-side container endpoint.

What the event data should look like in the server container

In server-side GTM preview, click the purchase event and check the Event Data panel. You should see all the GA4 parameters from step 3 — transaction_id, value, currency, items. If any are missing here, the problem is upstream in the web GTM configuration, not in the server container.

05
Server-side GTM · Rakuten tag
Configure the Rakuten pixel tag

With the server container confirmed to be receiving purchase events, configure the Rakuten pixel tag. Use the Rakuten Affiliate Tag template if it's available in the template gallery for your container — if not, you'll need a custom HTML tag or a custom template.

Key configuration fields

  1. Site ID — map this to the Rakuten Site ID constant you defined in web GTM. In the server container, you can read this from the event data if you're passing it as a custom parameter, or define it as a server-side variable constant.
  2. Order ID — map to transaction_id from the event data.
  3. Revenue — map to value from the event data. Confirm the value type — Rakuten expects a number.
  4. Currency — map to currency from the event data.

Trigger configuration

Set the trigger to fire on the purchase event only. Do not fire on all events — the Rakuten pixel should only fire once per purchase, on the confirmation event. Add a condition that transaction_id is not undefined to prevent the tag firing if the order data isn't present.

Deduplication: if you're running both a client-side Rakuten pixel (fired from web GTM) and a server-side one, you will double-count conversions. Choose one path — server-side is preferred because it's more reliable and not affected by ad blockers — and remove the client-side pixel if you're implementing server-side.

Troubleshooting — symptoms and causes

The following covers the most common failure scenarios, organised by what you're seeing rather than where the problem is. In each case, start your investigation at the top of the dependency chain.

Symptom Conversions not appearing in Rakuten reporting at all

The most common cause is the Rakuten Site ID being undefined or empty when the tag fires. Open GTM preview mode on the confirmation page and check the Variables tab. Look for your Rakuten Site ID variable — if it shows undefined, null, or an empty string, this is the problem.

Secondary causes: the Rakuten tag in the server container isn't being triggered (check the server-side preview — is the tag appearing in the fired tags list?), or the server container isn't receiving the purchase event at all (check whether the web GTM GA4 tag is routing to the server container endpoint).

Fix
Define the Rakuten Site ID as a GTM Constant variable in web GTM with the value hardcoded. Do not attempt to read it dynamically. If the server container isn't receiving events, verify the transport URL in the web GTM GA4 configuration tag points to your server container endpoint.
Symptom Rakuten conversions recording but with $0 or incorrect order value

The conversion is registering — the Site ID is correct — but the revenue value is wrong. Most commonly this is a type mismatch: value is being passed as a string ("49.99") rather than a number (49.99). Check the GA4 purchase event in DebugView and confirm the value parameter type.

Secondary cause: the data layer variable for revenue is reading from the wrong path, or the value is being read before the data layer push has completed and is returning undefined — which Rakuten then interprets as zero.

Fix
Ensure value is pushed to the data layer as a number, not a string. In your GTM Data Layer Variable for revenue, do not apply any string formatting. If the platform pushes it as a string, use a GTM variable transformation or a custom JavaScript variable to parse it: return parseFloat({{DL - Revenue}});
Symptom Duplicate conversions appearing in Rakuten reporting

Almost always caused by both a client-side and server-side Rakuten pixel firing for the same purchase. Check your web GTM container for any existing Rakuten tags — if you've added a server-side implementation without removing the original client-side pixel, every conversion will be counted twice.

Secondary cause: the confirmation page loading multiple times (e.g. user refreshing the page), with no deduplication logic in place. Rakuten does have some deduplication based on transaction ID, but this only works if the transaction ID is correctly passed.

Fix
Remove the client-side Rakuten pixel tag from web GTM if you've implemented server-side tracking. Keep only one path active. For page-refresh deduplication, ensure transaction_id is always correctly populated — Rakuten uses this for deduplication on their end.
Symptom Tag appears to fire in GTM preview but Rakuten shows nothing

The tag fires but the variables it's passing are empty or malformed, so Rakuten receives the request but can't process it as a valid conversion. This is different from the tag not firing — the network request goes out, but with no meaningful data.

In server-side GTM preview, click the Rakuten tag in the fired tags list and check the outgoing request details. Look at the actual URL or payload being sent — specifically the site ID, order ID, and revenue parameters. If any are empty or undefined in the outgoing request, the problem is in how the server container tag is reading the event data.

Fix
In the server-side Rakuten tag configuration, verify each field is mapped to the correct event data key — not a web GTM variable name. Server-side variables read from event data using keys like transaction_id, not GTM variable names like {{DL - Transaction ID}}. Use the Event Data variable type in server-side GTM and specify the exact key name.

Final verification checklist

Before considering the implementation complete, work through each of these in order. Each step confirms the previous dependency is working correctly.

GTM Variables tab (confirmation page): Rakuten Site ID shows correct non-empty value. Transaction ID, revenue, and currency all populated.
Data layer timing: ecommerce push appears before the purchase event in GTM preview event timeline.
GA4 DebugView: purchase event visible with transaction_id (string), value (number), currency (ISO code), and non-empty items array.
Server-side GTM preview: purchase event visible in stream with all ecommerce parameters populated in the Event Data panel.
Server-side Rakuten tag: appears in fired tags list on purchase event. Outgoing request contains site ID, order ID, and revenue with correct values.
Deduplication: no client-side Rakuten pixel active in web GTM if server-side is implemented.
Rakuten reporting: test conversion appears within the reporting delay window (typically up to 24 hours for affiliate reporting).
One implementation note: Rakuten's reporting has a delay — conversions don't appear in the dashboard immediately. After a successful test, wait at least a few hours before concluding that something is wrong. Use the GTM preview and DebugView verification steps above to confirm the implementation is correct before relying on Rakuten reporting to validate it.
Tracking problems across your whole GA4 property. If you're implementing Rakuten affiliate tracking, it's worth checking the rest of your GA4 setup at the same time. GA4 Health Check runs 47 automated checks across 7 modules and returns a scored report in 60 seconds. Run the audit — $79 →
Travis Gunn
Founder of GA4 Health Check. Working with Google Analytics since 2013, with over 250 clients audited across almost every industry vertical. 100% Job Success on Upwork for over a decade.