zwetan / as3-universal-analytics

Google Universal Analytics for AS3
Mozilla Public License 2.0
73 stars 11 forks source link

Demographics and Interest report #12

Open imatrofailo opened 8 years ago

imatrofailo commented 8 years ago

How to enable Demographic and Interest reports for Adobe AIR applications? What configuration and changes to tracking code are required?

zwetan commented 8 years ago

not tested at all and probably not supported.

here a quick overview on how it works Remarketing with Google Analytics

It is mainly a backend setting Enable Remarketing and Advertising Reporting Features in Google Analytics Create and manage Remarketing Audiences

Again not tested but here my guess what could work

by default analytics will be able to track the geolocation and/or IP of users so maybe the remarketing list based only on these infos could work

but because this remarketing also need to link google analytics with google adwords and reuse the Enhanced E-commerce, I'm pretty sure some features will not work like detecting a user that abandonned a purchase to present them targeted ads.

"As is" uananytlics does not

so you could test that

as mentioned in Smart Lists

Machine learning uses dozens of signals, including location, device, browser, referrer, session duration, and page depth to identify the users who are most likely to convert in a subsequent session. The model is typically updated daily to reflect the latest data to which Analytics has access, and users are automatically added to or removed from the Remarketing Audience based on that model.

So it is mainly a backend thing and it could work. The thing I'm sure will not work is the remarketing connected to the e-commerce.

Also look into Adwords help - Reach people who visited your site

imatrofailo commented 8 years ago

Thank you for your feedback!

I've tried to go through these steps and figured out that that this backend-method is only effective for website users. To enable demographic and interests reports for app users I need to updated app-tracking code per the methods outlined.

Is 'enableAdvertisingIdCollection' method currently supported by as3-universal-analytics?

zwetan commented 8 years ago

the backend of google analytics should have the same behaviour for web and app.

This particular method enableAdvertisingIdCollection is related to the SDK but should not prevent the backend to work.

Did you actually tried it ?

At this point, imho that's your only option, try to activate the backend option see if you get some "smart list" or other, or maybe go on the google analytics forum and ask your question there.

imatrofailo commented 8 years ago

I've enabled Demographics and Interest Reports feature in Google Analytics application properties. But still reports are empty. For web everything works fine (I can see demographic and interests reports), but for Adobe AIR mobile apps reports are empty. Please advice.

Samuramu commented 8 years ago

Is there anyone who managed to report using demographics? What I tries was: tracker.set("allowIDFACollection","YES");

As well as some other variations ("true",1", etc)

So far, no luck. Many thanks, love your library!

zwetan commented 8 years ago

I did not have time to investigate more than what was said before but again it is a backend setting

eg. you have to login to your Google Analytics account and enable the settings there first

for something like tracker.set("allowIDFACollection","YES");

it will not work as you can only set parameters that follow the Measurement Protocol Parameters Reference

there is a data model based on those parameters, you can to add ANY string eg. "allowIDFACollection" will simply be ignored

if you have to add a custom parameter you have to prepend the string with &

example:

tracker.set( "&abc", "123" );

note:
ideally use only lower case alpha chars and not a string that is already defined in the data model eg. &aid will mess up your data as it is already defined as Tracker.APP_ID

enableAdvertisingIdCollection is a function call specific to the Android SDK it got nothing to do with the measurement protocol

using tracker.set("allowIDFACollection","YES");

at best will do nothing at worst will invalidate the request


So I looked into it a bit more

IDFA stands for "Identifier for Advertising" and it does have a parameter &idfa=

and the "trick" is that it is not part of the measurement protocol but an added option (hence why it does not show up in the reference)

we can see an example here iOS Install Tracking

with a redirect URL

http://click.google-analytics.com/redirect?
    tid=UA-1234-1                                                 // Google Analytics Tracking ID.
    &idfa=BBA44F63-E469-42BA-833A-2AC550310CB3                    // Identifier for Advertising (IDFA)
    &aid=com.bundle.myapp                                         // App ID.
    &cs=network                                                   // Campaign source.
    &cm=cpc                                                       // Campaign medium.
    &cn=campaign_name                                             // Campaign name.
    &url=https%3A//itunes.apple.com/us/app/myApp/id123%3Fmt%3D8   // Redirect URL to iTunes.

so technically you could define this &idfa parameter in the measurement protocol

var tracker:AppTracker = new AppTracker();
    tracker.set( "&idfa", "BBA44F63-E469-42BA-833A-2AC550310CB3" );

and also pass the campaign parameters: Tracker. CAMPAIGN_NAME, Tracker.CAMPAIGN_SOURCE, Tracker.CAMPAIGN_MEDIUM, etc.

but the main problem is to retrieve those parameters during the app install which is similar to the issue #19 Campaign tracking on Android/iOS where we need an ANE to obtain the INSTALL_REFERRER

so yeah ideally we would need an uanalytics-ANE that obtains

and we would need to inject this data into the uanalytics AS3 lib

All that is quite time consuming and don;t really have time now to do that but I keep a note on the side for when I'll have more free time

Anyway, "as is" it ca not be done with only AS3 and/or the AIR API and there is no workaround