Git Product home page Git Product logo

analytics-google-adid's Introduction

Google Analytics Plugin

This plugin depends on com.analytics.google. Cordova (PhoneGap) 3.0+ Plugin to connect to Google Analytics native SDK. Enables advertising id collection (IDFA) to get enhanced analytics (Demographics and Interests).

iOS CAUTION: Ensure to check advertising id option when you publish your app. Otherwise it will be rejected.

Prerequisites:

  • A Cordova 3.0+ project for iOS and/or Android
  • A Mobile App property through the Google Analytics Admin Console

Platform SDK supported

  • iOS, using Google Analytics SDK for iOS, v3.10
  • Android, using Google Play Services for Android, v6.1

Quick start

To install this plugin, follow the Command-line Interface Guide. You can use one of the following command lines:

  • cordova plugin add cordova-plugin-analytics-adid
  • cordova plugin add https://github.com/appfeel/analytics-google-adid.git

Make sure to review the Google Analytics terms and SDK Policy


Javascript API

Note: All success callbacks are in the form 'function () {}', and all failure callbacks are in the form 'function (err) {}' where err is a String explaining the error reason.

Start Google Analytics

startAdIdTrackerWithId(id, success, fail);

Start Analtytics tracker with advertising id collection enabled:

  • {String} id: (Required) your Google Analytics Universal code: UA-XXXXXXX-X.
  • {function()} success: (Optional) success callback.
  • {function()} failure: (Optional) failure callback.

Advertising id

getAdId(success, error);

Gets the advertising id (IDFA).

  • {function()} success: (Optional) success callback with advertising id (IDFA) as string argument.
  • {function()} failure: (Optional) failure callback.

analytics-google-adid's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

analytics-google-adid's Issues

Plugin seems not work

Hi i have installed the plugin and put the code inside the app but no demographic results are showed in the analytics dashboard. Works with classics analytics data.

i put
analytics.startAdIdTrackerWithId('UA-xxx); in my main page.

what's wrong?

com.android.dex.DexIndexOverflowException: method ID... + how to fix

On build.gradle:

Change:

dependencies {
compile fileTree(dir: 'libs', include: '*.jar')
// SUB-PROJECT DEPENDENCIES START
...
compile "com.google.android.gms:play-services:+"
// SUB-PROJECT DEPENDENCIES END
}

To:

dependencies {
compile fileTree(dir: 'libs', include: '*.jar')
// SUB-PROJECT DDDEPENDENCIES START
...
// compile "com.google.android.gms:play-services:+"
compile "com.google.android.gms:play-services-analytics:+"
// SUB-PROJECT DDDEPENDENCIES END
}

It's NOT possible to add ALL of Google Play Services.... so we must add only play-services-analytics.

XDK Android build fails: plugins failed to install.

Error: Plugin Google Play Services for Android failed to install.
Error: Plugin Google Analytics Plugin failed to install.
Error: Plugin Google Analytics Plugin with Advertising Id failed to install.

iOS succeeds

It conflicts with phonegap-plugin-push

When I try to install both, there is a conflict. Can you fix it please? The error is:

FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':transformClassesWithJarMergingForDebug'.
> com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/google/android/gms/iid/zzc.class

* Try:
Run with --stacktrace option to get the stack trace. Run with
--info or --debug option to get more log output.

BUILD FAILED

JSON ERROR

Hi,

ANDROID ISSUE

I have created a fresh cordova app and added your plugin.
When i run this command:

cordova.exec(Success, Fail, 'GAPluginAdId', 'startAdIdTrackerWithId', 'UA-XXXXXXXX-X');

The Fail callback is returned with a error of JSON Error? If i ignore this error and continue to request a ADID it seems to give a ADID back? is this ADID going to be correct?
Any ideas what the JSON Error is?

question: does this plugin respect the user's "limit ad tracking" setting?

I'm new to mobile dev - especially for Apple - and I noticed, upon submitting my app for review, that I'm asked to swear that my app "checks and honors a user's Limit Ad Tracking setting in iOS and, when it is enabled by a user, [...] does not use Advertising Identifier".

do I need another plugin to check this value, or does your plugin do this check for me somehow? (I tried looking at the source code; I'm not familiar with Objective C, but I didn't see anything that looked obviously like it was checking this for a "limit ad tracking" setting.)

'com.google.android.gms' conflict with phonegap-plugin-push

I am getting a conflict with com.google.android.gms when using this plugin with phonegap-plugin-push.

Execution failed for task ':processDebugResources'.
> Error: more than one library with package name 'com.google.android.gms'

Any assistance here as I need to use Push Notifications as well as use the ADID data.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.