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

How to set a custom page when sending an event? #196

Open
muiscatron opened this issue Jan 18, 2017 · 2 comments
Open

How to set a custom page when sending an event? #196

muiscatron opened this issue Jan 18, 2017 · 2 comments

Comments

@muiscatron
Copy link

I am tracking pageviews and events in my application. I used the regular expression method setRemoveRegExp to filter out sensitive information from page urls, and this worked OK. However, when I send events, the default page associated with the event does not have this filtering applied, and the sensitive information is still visible in the Pages report which is within the Google Analytics "Events" reporting section.
I tried to apply a custom "page" property to the trackevent method call like this:

this.Analytics.trackEvent('category', 'action', '', value, false, { page: '/home' });

But it does not seem to work. When I look at network traffic in the browser debugger, it has the actual full URL populated in the "dl" parameter.
The 'dp' parameter is being set correctly to the custom page property value.
But this alone does not seem to prevent google analytics from recording the sensitive URL.
Is there any way to have complete control of the page details when sending an Event?

@muiscatron
Copy link
Author

Further information:
When I call trackEvent and send the value parameter as null, dp property is never set in the collection api.
If I set any value such as 0, the dp property is set using the page property value.

@iamvenkat45
Copy link

+1

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