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

PIDP-898 Add Snowplow web tracker #519

Open
wants to merge 18 commits into
base: develop
Choose a base branch
from

Conversation

Paahn
Copy link
Collaborator

@Paahn Paahn commented Apr 24, 2024

  1. Adds Snowplow web tracker that reports to government instance of Snowplow
  2. From Snowplow quickstart docs the collector configuration descriptions:
  • app_id -> Unique identifier for website/application. Type: string
  • platform -> The platform the app runs on. Examples: web, mob, app. Type: string
  • forceSecureTracker -> Normally the protocol (http or https) used by the Tracker to send events to a collector is the same as the protocol of the current page. You can force it to use https by setting the forceSecureTracker field of the configuration object to true.
  • cookieLifetime -> Set the cookie lifetime. Type: int
  • contexts -> Configure context entities to add to all events. Type: object

@Paahn Paahn added the Ready For Review PR is code-complete (or very close) and only needs some review and/or manual testing label Apr 24, 2024
@Paahn Paahn self-assigned this Apr 24, 2024
@Paahn Paahn added DO NOT MERGE Definitely don't merge this PR! and removed Ready For Review PR is code-complete (or very close) and only needs some review and/or manual testing labels Apr 25, 2024
var collector = 'spm.apps.gov.bc.ca';
window.snowplow('newTracker', 'rt', collector, {
appId: 'Snowplow_standalone',
cookieLifetime: 86400 * 548,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why specifically the 548?
Can we keep this number in any config and use it here ?. Later if we want to change the cookieLifetime then simply changing the config without changing this snowplow.js file will work.

Copy link
Collaborator Author

@Paahn Paahn May 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is part of testing environment code that we were asked to add as is to the application, to send data from our PR deployed environment for now. It is still unclear how/if snowplow tracking will be utilized.

window.snowplow('newTracker', 'rt', collector, {
appId: 'Snowplow_standalone',
cookieLifetime: 86400 * 548,
platform: 'web',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just curious. Then it will report only in web not in mobile ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this case Snowplow is referring to 'web' as client side tracking. Reference docs

@Paahn Paahn closed this May 3, 2024
@Paahn Paahn reopened this May 3, 2024
Copy link

sonarcloud bot commented May 10, 2024

Quality Gate Passed Quality Gate passed

Issues
2 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DO NOT MERGE Definitely don't merge this PR!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants