Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Can override the page location parameter in the browser side Facebook pixel #43

Open
RahiReja opened this issue Aug 30, 2023 · 2 comments

Comments

@RahiReja
Copy link

Suppose I have a website in which I have a iframe. I have setup my pixel in the iframe. Now if I fire any event it is taking the iframe src URL not the main website URL. Now I want to override the URL parameter. But I can't do that in the browser side pixel. As the pixel automatically collects the page URL parameter. It will be nice if we can override the URL parameter as GA4 allows to override the page_location parameter so that the right page URL shown in the event manager. Not the iframe URL.

If It is possible in the browser side pixel right now pls guide me how do I implement that.

@joaomelosb
Copy link

Perhaps you could try something like this:
gtag('conversion', 'purchase', { page_location: top.location.href })
Note: Only work if the iframe isn't cross-origin.

@RahiReja
Copy link
Author

@joaomelosb It is Facebook pixel not google tag. In google Tag we can override but not in the Facebook pixel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants