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

Update custom dimension data object names to match Google documentation #2968

Closed
wants to merge 1 commit into from

Conversation

maxxcrawford
Copy link
Contributor

No description provided.

Comment on lines +146 to +147
cd5=request_data.get("dimension5", None),
cd7=request_data.get("dimension7", "website"),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note: Based on this documentation, the previous setting is the correct way?
Screen Shot 2023-01-03 at 2 48 12 PM

We may need to wrap both items in a nested object:
Screen Shot 2023-01-03 at 2 48 44 PM

Copy link
Member

Choose a reason for hiding this comment

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

The library google-measurement-protocol is using the measurement protocol (universal analytics), so the documentation to use is Measurement Protocol Parameters. Yes, cd5 is custom dimension 5, I believe the change in this PR is correct.

The library is using https://ssl.google-analytics.com/collect as their base URL (see the code), but the Google docs say to use https://www.google-analytics.com/collect. I wonder if the library is out of date? It looks like a fairly thin wrapper around requests, a Python HTTP request library.

This user reports a change of user agent is needed to get to the GA server: mirumee/google-measurement-protocol#22. However, the docs imply that is only needed to set the browser, platform, and mobile capabilities.

@maxxcrawford maxxcrawford force-pushed the custom-dimension-ga-fix branch from 7a7a20c to 1433bc4 Compare January 3, 2023 20:53
@maxxcrawford
Copy link
Contributor Author

Closing as this is not necessary. Having a custom field may still be helpful in the future but updating the label name is not needed.

@maxxcrawford
Copy link
Contributor Author

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

Successfully merging this pull request may close these issues.

2 participants