Last updated
Revenue First Analytics pushes page views, product views, add to cart, begin checkout and purchase events to window.dataLayer on every site where tracking is enabled; there is no setting to turn on. The pushes use a flat payload with an items array for checkout and purchase, so you can build Google Tag Manager triggers and GA4 e-commerce tags on them. The plugin itself never sends anything to Google.
Think of it as a mirror. Everything the plugin records for its own reports is also announced on the page, and your Google Tag Manager container decides what to do with it. If you do not use Tag Manager or GA4, you can ignore this page; the pushes are harmless and cost nothing.
Which events are pushed to the dataLayer?
| event | When it fires | Keys in the push |
|---|---|---|
rfa_page_view | Every pageview, including single-page navigation | page_path, page_referrer; utm_source, utm_medium, utm_campaign on the first pageview of a visit with UTM parameters |
view_item | A WooCommerce single product page loads | product_id |
view_item_list | A WooCommerce product category or tag page loads | category_id or tag_id |
add_to_cart | A product is added through WooCommerce’s classic AJAX add-to-cart button, or through the EDD AJAX cart | product_id, product_name, quantity, price, source: "rfa" |
begin_checkout | The checkout page opens with items in the cart, once per session | cart_total, item_count, currency, items, source: "rfa" |
purchase | The WooCommerce thank-you page or EDD receipt page, once per order | order_id, total, currency, tax, shipping, item_count, items, source: "rfa" |
rfa_ | Any custom event: window.rfa('signup_click') becomes rfa_signup_click, a data-rfa-goal click uses its goal name, scroll depth sends rfa_scroll_25 to rfa_scroll_100 with depth, and data-rfa-scroll-goal sends rfa_scroll_goal with label | The data you passed to window.rfa() |
Each entry in items has item_id, item_name, quantity and price. After the visitor has given statistics consent (or in Full tracking), every push from the tracker also carries rfa_visitor_id, the value of the _rfa_vid cookie; before consent that key is absent. The source: "rfa" key on the e-commerce pushes lets you tell them apart from pushes made by other plugins.
Custom events and goals are described in Tracking Button Clicks and Custom Events and Creating Goals.
On which pages do the pushes happen?
- Page, product and custom events are pushed by the tracker script on the page where they happen, at the moment they happen.
- add_to_cart is pushed by a small inline listener in the footer that reacts to WooCommerce’s
added_to_cartjQuery event or EDD’sedd_cart_item_addedevent. Add-to-cart actions that do not fire those events (the WooCommerce block cart, a plain form submit that reloads the page) are recorded in your reports but are not pushed to the dataLayer. - begin_checkout and purchase are generated on the server and printed as an inline script in the footer of the checkout page and the thank-you or receipt page. A purchase is pushed once per order; refreshing the thank-you page does not push it again.
Is the payload in GA4 e-commerce format?
Not exactly. GA4’s recommended format wraps everything in an ecommerce object and uses value and transaction_id. The plugin pushes flat keys named total and order_id instead, while the items entries already use GA4’s item parameter names. A purchase push looks like this:
window.dataLayer.push({
"event": "purchase",
"order_id": "1842",
"total": 79.9,
"currency": "EUR",
"tax": 13.32,
"shipping": 4.9,
"item_count": 2,
"items": [
{ "item_id": "311", "item_name": "Linen shirt", "quantity": 1, "price": 59 },
{ "item_id": "87", "item_name": "Gift wrap", "quantity": 1, "price": 16 }
],
"source": "rfa"
});
Because the keys are flat, you map them to GA4 parameters in Tag Manager rather than reading ecommerce from the data layer. That takes a few extra variables, described next.
Build a GTM trigger and a GA4 purchase tag
- In Tag Manager, create four Data Layer Variables named after the keys:
order_id,total,currencyanditems. - Create a Custom Event trigger with the event name
purchase. Optionally add the condition source equals rfa so pushes from other plugins do not fire it. - Create a Google Analytics: GA4 Event tag with the event name
purchase. Add the event parameterstransaction_id={{order_id}},value={{total}},currency={{currency}}anditems={{items}}. - Attach the trigger, preview a test order on the thank-you page, then publish the container.
Repeat the pattern for begin_checkout (map cart_total to value) and add_to_cart (build a single-item items array from product_id, product_name, quantity and price with a custom JavaScript variable, or send them as plain parameters). For the plugin’s own pageview push you normally do not need a tag, since GA4 counts page views itself.
Does the plugin send data to Google?
No. The plugin writes objects into window.dataLayer, which is a JavaScript array on the page. It does not load Tag Manager, gtag.js or any Google script, and nothing leaves the visitor’s browser unless your own container sends it. Consent for whatever your tags do is therefore your container’s job: the pushes happen in every tracking mode, including before the visitor has consented, because the push alone transmits nothing. Use GTM’s consent settings to gate your tags, and connect your banner to the plugin as described in Connecting Your Cookie Banner if you want rfa_visitor_id to appear only after consent.
The pushes are skipped for logged-in administrators when Exclude admin users is on, unless Debug mode is also on. For server-side event delivery to Meta instead of Google, see Facebook Conversions API and Pixel for WooCommerce.
How do I see the pushes while testing?
Turn on Debug mode in the Developer Tools card of Settings and open your site’s frontend as an administrator. The debug panel in the bottom-right corner has a dataLayer tab that lists every object currently in window.dataLayer, including the plugin’s pushes and anything your own container added. Tag Manager’s Preview mode shows the same events on its side. If a purchase shows in the panel but your GA4 report stays empty, the gap is in the container, not in the plugin.