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 do i configure multiple tracking codes for different site collections #461

Open
PikeSal opened this issue May 9, 2022 · 3 comments
Open

Comments

@PikeSal
Copy link

PikeSal commented May 9, 2022

Sample

js-application-analytics

Author(s)

@hugoabernier

Question

I need to configure Google Analytics on two site collections, the readme mentions adding the tracking ID and URL in config/serve.json, how do i configure tracking for two SharePoint online sites using two Google Analytics tracking IDs.

@ghost
Copy link

ghost commented May 9, 2022

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

@PikeSal
Copy link
Author

PikeSal commented May 16, 2022

Any update?

@mohammadamer
Copy link
Contributor

Hi @PikeSal

One approach could be by set a property bag for every site to hold the tracking Id. Then in your code you could get the tracking id of the current site. doing that will make the SPFx extension work like an extension for every site.

This way will enable you to get analytics for two sites in two different google analytics.

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

No branches or pull requests

3 participants