The Share event occurs when a user shares content (for example, a user shares a product with their friends via email or their social network). Measure this event after the user completes the sharing action. This Share event can help you determine which of your users are loyal and point to the user engagement with your app.
OUR_ADVERTISER_ID should be replaced with your advertiser ID defined by MAT.
- advertiser_id – ID of your advertiser defined by MAT.
- site_id – ID of your app defined by MAT.
- sdk=server – Notifies MAT that the measurement request is originating from a server (rather than the typical mobile SDK).
- response_format=json – Notifies the MAT platform that server-side attribution is being used and returns a server-friendly json response.
Required User Identifier(s)
Specify as many advertising identifiers for attribution. Based on the identifiers you’ve implemented for measure sessions, you’ll want to include the same identifiers for any event especially if your marketing team is planning on doing re-marketing / re-targeting campaigns.
- google_aid – The Google AID formatted as uppercase with hyphens. AAAAAA-BBBB-CCCC-11111-2222222222222
- google_ad_tracking_disabled – If the google_aid parameter is going to be used, then google_ad_tracking_disabled parameter must be specified to indicate whether the user has limited ad with 1 being limited.
- ios_ifa – Apple’s new Advertiser Identifier with iOS 6.0+. Also, referred to as IFA or IDFA.
- ios_ad_tracking_disabled – If the ios_ifa parameter is going to be used, then ios_ad_tracking_disabled parameter must be specified to indicate whether the user has limited ad with 1 being limited.
- ios_ifv – Apple’s new Vendor Identifier with iOS 6.0+. Also, referred to as IFV or IDFV.
- windows_aid – The Windows advertising identifier (AID) is a unique, user and device-specific, and resettable ID for advertising represented as an alphanumeric string formatted as upper case without colons (for example, “AAAAAABBBBCCCC111122222222222”). When the advertising ID feature is disabled, this value is an empty string.
It’s also recommended to set your own user id value that you use to uniquely identify the user in your system. This value should not be a device or advertising identifier including any listed for Android, iOS or Windows. This value needs to be the value you’ve given the user in your own system and is used for de-duplication and cross-device attribution. If the user_id is 1234 and then you set user_id to 5678 for the same user, then we’ll create a new install and user because the user_ID’s are different (our system considers it as a new/different user).
- user_id – Unique user ID (defined by advertiser) of user. Example value: 10001
Similarly, we recommend that you set your own user values that can also be used for cross-device attribution:
- user_email – The email of the user defined by the advertiser. Example value: firstname.lastname@example.org
- user_name – The username of the user defined by the advertiser. Example value: tom12345
For information about handling personally identifiable information (PII) and other sensitive data, please visit Handling User Information.
Recommended Device Parameters
These recommended parameters allow us to provide more granular insight on the user’s and their devices. This data can then be used to segment and filter on in your reporting.
- device_ip – IP address of the user device recorded on conversion. You can find the device IP in the header of the request that you receive from the user device.
- device_brand – Brand or maker of the user device (such as “Apple” or “Samsung”). Learn how to collect Device Brand in-app.
- device_model – Model of the user device recorded on conversion (such as “iPhone5,2″ or “GT-i9300″). Learn how to collect Device Model in-app.
- os_version – Version of the operating system (such as iOS or Android) on the user device . Learn how to collect OS Version in-app.
- device_carrier – Carrier of the device if supports cellular like AT&T.
- language – Language of the device from local settings.
- country_code – The ISO ALPHA-2 or ISO ALPHA-3 value of the country. For a complete list of ISO-compliant country codes, please visit Country Codes.
Optional Reconciliation Parameters
- created – Value as UNIX timestamp. If created is not set, current date time will be used. The created timestamp must be within 30 days prior and no more than 1 day in the future else we will use current timestamp.
- advertiser_ref_id – Reference ID specified by advertiser to reconcile with their own or third-party system.
Required HTTP Headers for Authentication
All requests for measure session must include Authentication Method for SDK-less use of Measurement API in order to validate the authenticity of the request as your own.
The authentication method requires a public key (Consumer Key) and signature seeded with a private key. These two keys are associated to a single user.
- Private Key – This is the Private key that will be used to generate the signature on both the client and server but will not be included in the request.
- Consumer Key – This is the public key that will be included with each request so the Private Key used to create the signature can be identified.
A Signature will then be generated by hashing the Private Key with URL parameters.
The Consumer Key, Signature and timestamp values need to included need to be included as HTTP headers in the request. With Curl in PHP they would be set with curl_setopt.
Accordingly, these three values need to be set in the HTTP header of each request.
- mat-consumer-key: ‘consumer key’
- mat-signature: ‘signature’
- mat-timestamp: ‘timestamp’
Example Measure Share URL for iOS App
Example Measure Share URL for Android App