Google Analytics 4 Not Attributing Google Ads Traffic Correctly in NetSuite Commerce?

Question from user:

Hi, I have a website built through NetSuite and have integrated NetSuite Commerce.

The website has GTM and GA4 installed and shows up everytime.

However, 90% of the traffic is attributed to Direct channel. Meanwhile, they should have attributed to Paid Shopping or Paid Search (Google Standard shopping campaign)

The point is that it still recognises other organic sources properly.

Note: I have tried to use UTM but still not working. The URL is not truncated/ redirected after clicking from Ads. The GA4 Landing Page only shows the raw link path without any UTM

Answer from Nabil:

The short answer is:

Why is Google Analytics 4 not correctly attributing Google Ads traffic in NetSuite Commerce?

This issue where paid traffic is being incorrectly attributed to the Direct channel in GA4, despite having GTM installed, is highly likely due to a problem with how the Google Ads click identifier (gclid) or your custom UTM parameters are being processed or passed to the GA4 tag before the page fully loads or a subsequent event fires.

NetSuite Commerce’s platform-specific configurations or potential single-page application (SPA) nature might be interfering with the standard tracking mechanisms.

A robust solution involves leveraging the NetSuite Commerce API to extract transaction and campaign data, which, when combined with the Google Ads API for click data, can be sent to GA4 via a server-side tagging solution like Stape or Google Cloud Platform, ensuring accurate, first-party data collection independent of browser-side issues.

The long answer is:

Your situation is a very common and frustrating one where you’re seeing a high volume of paid traffic fall into the Direct channel in GA4, even though organic sources are tracking correctly and you’ve confirmed no URL truncation or redirects.

The fact that the GA4 Landing Page report shows the raw link path without any UTM parameters is the key symptom here.

This indicates that either the Google Click ID (gclid) from Google Ads auto-tagging or your manual UTM parameters are not being captured by the GA4 configuration tag before the page view or other key events, like purchase, fire.

The NetSuite Commerce platform, especially if it utilizes a single-page application (SPA) architecture, can sometimes cause issues where the GA4 tag fires too early, before the URL parameters are fully read by GTM, or too late, after a virtual page view occurs, leading to the loss of attribution data.

The gclid parameter, which is essential for auto-tagging, is designed to be persistent, but client-side tag configurations can still fail to capture it.

To completely bypass these client-side browser and platform interferences, the most reliable and future-proof solution is to implement server-side tracking using the NetSuite Commerce API in conjunction with the Google Ads API and a server-side container hosted on a platform like Stape or Google Cloud Platform.

The NetSuite Commerce API is an excellent source of rich transaction data, including the necessary order details and potentially even the original session information if NetSuite is configured to store it.

You can use this API to create a robust data layer that extracts the final transaction details.

Separately, you can utilize the Google Ads API to query the click and campaign data associated with the user’s session, perhaps by capturing the gclid and passing it to your server-side environment.

This server-side environment, whether it’s Stape or GCP, can then act as a middle layer to match the transaction data from NetSuite with the campaign data from Google Ads and send a complete measurement payload to GA4 using the Measurement Protocol.

This approach ensures that attribution data is based on reliable, first-party server data rather than relying on the user’s browser, which can be affected by ad blockers, cookie restrictions, and the specific way NetSuite Commerce handles page loads.

This provides highly accurate attribution for standard events like page_view, view_item, and especially for the crucial purchase event, resolving your Direct traffic issue once and for all.

About The Author