Socket
Book a DemoInstallSign in
Socket

cordova-plugin-analytics-adid

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cordova-plugin-analytics-adid

Google Analytics Phonegap, Cordova, Intel XDK plugin for iOS/Android with Advertising Id Collection enabled

latest
Source
npmnpm
Version
1.5.1
Version published
Maintainers
1
Created
Source

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.

Keywords

analytics

FAQs

Package last updated on 03 Jan 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts