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

Google Analytics tracking screen name error #194

Open
zephyr-dev opened this issue Aug 3, 2015 · 3 comments
Open

Google Analytics tracking screen name error #194

zephyr-dev opened this issue Aug 3, 2015 · 3 comments

Comments

@zephyr-dev
Copy link

When tracking screen name with Google Analytics I get this warning in the console.

<GoogleAnalyticsProvider: 0x7ff99a05f920>: property ignored screen:Dashboard

Also none of the page views show up in Google Analytics.

I think the solution is to override didShowNewPageView:withProperties: in GoogleAnalyticsProvider.

If someone can confirm the issue I can submit a pull request.

@sodastsai
Copy link
Contributor

I had this issue before, and fixed it via

GoogleAnalyticsProvider *gaProvider =
    (GoogleAnalyticsProvider *)[ARAnalytics providerInstanceOfClass:[GoogleAnalyticsProvider class]];
gaProvider.customDimensionMappings = @{
    @"some-custom-property": [GAIFields customDimensionForIndex:1],
};

is this also workable for you? or you could still submit a PR to make it better than this configuration way.

@zephyr-dev
Copy link
Author

I think I will submit a PR soon. That solution might not be a sustainable fix unless the documentation is changed.

@sodastsai
Copy link
Contributor

I see. Last time when I had this issue, I'm the guy who submitted a PR (#111) for this.

In that PR, I exposed the interface to access instances of providers (+[ARAnalytics providerInstanceOfClass:])
And the GoogleAnalyticsProvider class does provide 2 properties to custom Google Analytics's custom dimension and metrics.

I know that I forgot to attach a document about this. So if this does fix your issues, maybe let's write documentation for this? Anyway, you are still welcome to submit a PR to extend/replace it if this doesn't help you at all.

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

No branches or pull requests

2 participants