499 Errors reducing conversion numbers?

Hi there!
I’ve been watching my sGTM implementation and comparing it to the client implementation that I still have running. The numbers are mostly fine for most events, but three events in particular are consistently over 2% lower than the client side’s numbers. After a ton of digging and testing, I’ve found a large number of 499 errors for those events specifically. I believe this means the client is closing the connection before the server is able to process the request.

Do you have any advice on why this may happen, and how to resolve it? Am I sending too much data from the client that needs to be processed? Should I reduce the amount of data sent?

Hi Megan,
I guess such events happen right before the redirect to the other page. If you are using Stape Data Tag to pass the information from web to server, you may try enabling “Use fetch instead of XMLHttpRequest” in the tag settings. Using fetch with keepalive option allows the request to outlive the page, which may probably solve your problem.

You’re absolutely right! I tried out the Data Tag implementation and the GA events are matching up with my expecations nicely. I’m curious how it works with Google Ads? Does the Conversion Linker work with the Data Tag? How about the Google Ads Conversion Tracking tag? I don’t want to switch over completely to the Data Tag until I know that those integrations will work smoothly as well. Is there a guide as to how to integrate the two? Or will it work out of the box?

It works well for Google Ads Conversion tracking. All you need to do is to enable “Support rich command protocol” in Data tag settings and you’ll be able to fire conversion linker and conversion tracking tags on the sGTM from such hits.

When I enable the “Support Rich Command Protocol” in the data tag (with the “use fetch” option selected as well), I get a JSON Parse error:
“Error processing response data: SyntaxError: Unexpected end of JSON input” stemming from line data-tag.js:123.

I’ve created a simple data tag with no extra event data or anything, straight page view with this option selected and the Fetch instead of XHR option selected and I get that error every time. Could you look into this for me?


Thank you for noticing it, we’ll take a look.
However this should not affect tag’s functionality. I’d just suggest to test it on some secondary conversion to validate that everything works as you expect.

Thanks for taking a look at this for me! Unfortunately, we were seeing some issues with pages hanging during events, and are hesitant to turn this back on as it was an error that could have contributed to the pages not loading. When you get a look into this, could you update me? I’m not sure if we could move forward with the error persisting. I’d really appreciate it! Thank you!

I looked into this and have added a PR to remove this unnecessary console.error. We’re resolving bugs on an existing site, and it would be fantastic to knock this out out to de-clutter things. Thanks!

There is a way to do it with Google Tag, instead Stape Data Tag?

Google tags do not provide an option to choose what request method to use.

1 Like