Stop tests from triggering google analytics
- Dominant language
- JavaScript
- Stars
- 7.2k
- Forks
- 621
- PR merge metrics
- No merged PRs in 30d
Description
Tried searching for a way to stop triggering google analytics on every scenario that gets run () having three different viewports also triggers a visitor for each test). This is probably an easy thing to do, but not really succeeding in this.
I sadly do not have any way to exclude my local machine from the google analytics.
I tried adding following in playwright/onBefore.js but this is unsuccessful. Any tips?
`browserContext.route('*.google-analytics.com', request => request.abort());`
Contributor guide
Research direction
Start with the attempted route in playwright/onBefore.js and inspect how BackstopJS initializes browser contexts for each scenario and viewport. Verify the change by running scenarios and confirming that Google Analytics requests are not triggered.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100