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 prepend logged url without setting the whole url? #11300

Closed
mronnlun opened this issue Jan 30, 2017 · 1 comment
Closed

How to prepend logged url without setting the whole url? #11300

mronnlun opened this issue Jan 30, 2017 · 1 comment
Labels
answered For when a question was asked and we referred to forum or answered it.

Comments

@mronnlun
Copy link

We have a government site http://www.someagency.eu that is public and requires no login. There is also a subsite with electronic services requiring login, e.g. https://eservices.someagency.eu. All start pages for the e-services are on the public site. In some cases the url's for the sites can be the same, e.g. there can be both http://www.someagency.eu/somepage and https://eservices.someagency.eu/somepage.

When tracking that site we would like to log the used url as normal but prepend it with the site name, e.g. logged url would be /public/somepage and /eservices/somepage.

Can I prepend the logged url somehow or do I have to use setCustomUrl and set it like '/public/' + location.href?

@tsteur
Copy link
Member

tsteur commented Jan 30, 2017

It should be still a URL that starts with http:// so I would rather do something like http://public.$yourdomain and make it a subdomain or you can prepend it to the your path like http://$yourdomain/public/$yourpath. '/public/' + location.href would result in /public/http://$yourdomain. If you need help with JavaScript you could for example ask in our forums: https://forum.piwik.org

@tsteur tsteur closed this as completed Jan 30, 2017
@tsteur tsteur added the answered For when a question was asked and we referred to forum or answered it. label Jan 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answered For when a question was asked and we referred to forum or answered it.
Projects
None yet
Development

No branches or pull requests

2 participants