David Wells
David Wells
Looks like the `href` parameter passed here https://github.com/DavidWells/analytics/blob/master/packages/analytics-plugin-google-analytics/src/node.js#L59 maps to "hostname" in pageview here https://github.com/peaksandpies/universal-analytics/blob/master/lib/index.js#L124 I think this might have to be hostname e.g. `config.baseUrl` in your example. Try changing...
The `analytics.page` function passes through all values. Here is an example with a modified `page` call for GA ```js const analyticsLib = require('analytics').default const googleAnalytics = require('@analytics/google-analytics').default const originalPlugin =...
Try to set `setCustomDimensionsToPage` to false ``` Analytics({ app: 'my-app', plugins: [ googleAnalytics({ trackingId: 'my-tracking-id', anonymizeIp: true, setCustomDimensionsToPage: false, customDimensions: { userState: 'dimension1', }, }), ], }), ``` https://github.com/DavidWells/analytics/blob/master/packages/analytics-plugin-google-analytics/src/browser.js#L178 This...
Sounds good to me. Happy to have a PR on this 😃 How would this work exactly? Adding a `use-analytics.d.ts` file, [like this](https://gitlab.com/trao/trao.dev/-/blob/master/global.d.ts#L11-18), to the use-analytics package? Thanks!
Hey @xthilakx The way that it works with analytics-core is like this: 1. This [npm script is run](https://github.com/DavidWells/analytics/blob/master/packages/analytics-core/package.json#L37) 2. during that script JSdocs are parsed and typedefs are generated 3....
I'd rather not maintain a typescript package. Happy to accept a PR with the types tho. `[email protected]` + has full types for the underlying library.
Hey @saiichihashimoto good point. Do you know what the updated types should look like to export the `AnalyticsPlugin` as well?
Thanks for the PR! ❤️ Added a couple of notes
This is an interesting use case. Let me see if I get this correct: You want to alter the payload for all events passing into a downstream analytics provider (in...
I see what you mean. (IIRC) The payloads are merged https://github.com/DavidWells/analytics/blob/master/packages/analytics-core/src/middleware/plugins/engine.js#L233-L236 and it looks like those null keys still get passed through. It seems like we could automatically strip null...