My website is receiving referral traffic in the format:

/page/fbclid, undefined, nm
/page/fbclid, undefined, nm?next=/string1/string2/

I've tried GA's Exclude URL Query Parameters to no avail

Exclude URL Query Parameters

  • 1
    Those are unusual links. I don't think GA will be able to remove fbclid as a query parameter when it doesn't have a ? before it - but I have also never seen it without a ? before it, because typically Facebook adds it automatically (and hence in a standard syntax). It makes me wonder whether these are truly clicks through from Facebook. Are these pages showing up in your Behavior > Site Content > Landing Pages report? Do you include GA directly or use Google Tag Manager?
    – Reve
    Commented Mar 4, 2020 at 17:49
  • Also to add to Reve's comment nm?next=/string1/string2/ the query parameter is next
    – Bronwyn V
    Commented Mar 4, 2020 at 18:06
  • "query parameter when it doesn't have a ? before it" - these are not query string parameters. Only name in the 2nd URL is a "query string parameter". Do these URLs only appear in the GA report? Or do they also appear in your server access logs? Are these URLs the Referer URL, from which the traffic is coming? Or the target URL (ie. "referral traffic") on your site?
    – MrWhite
    Commented Mar 5, 2020 at 0:34
  • @Reve 1/ Those pages are showing up under Behaviour > Site Content > All Pages 2/ We use both GA & GTM. Commented Mar 5, 2020 at 5:57
  • @MrWhite They appear in the GA report. I haven't checked the server logs yet. I'm certain these are referer URLs. Our Django views.py and urls.py doesn't have URL mapped to any of the format above. Commented Mar 5, 2020 at 6:01

1 Answer 1


So I ended up writing a script to remove fbclid before sending data to GA basis off this GA documentation

 * Checks to see if the Facebook parameter 'fbclid' is
 * found in the path, if it is, remove it.
if (document.location.pathname.indexOf("fbclid") > -1) {
    let pathName = document.location.pathname;

    /** Cleans path
     * From "/courses/fbclid, undefined, nm?fbclid=IwAR3CqQ-jm051SOOL7i.../"
     * to "/courses/"
    pathName = pathName.substring(0, pathName.indexOf("fbclid"));
    ga('send', 'pageview', pathName);
} else {
    ga('send', 'pageview');

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.