Access your interface

Enter your email address to access your personal interface.

Android native

Updated 1 July 2026

Installation

Add the JitPack repository to your root build.gradle file:

allprojects {
    repositories {
        maven { url 'https://jitpack.io' }
    }
}

Add the dependency to your module’s build.gradle:

dependencies {
    implementation 'com.github.EulerianTechnologies:eanalytics-android:1.9.0'
}

Add the required permissions to your AndroidManifest.xml:

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />

To track installs from Google Play, also add this receiver:

<receiver
    android:name="com.eulerian.android.sdk.InstallReferrerReceiver"
    android:exported="true">
    <intent-filter>
        <action android:name="com.android.vending.INSTALL_REFERRER" />
    </intent-filter>
</receiver>

Initialisation

Initialise the SDK in your Application.onCreate(). First declare your Application subclass in the manifest.

<!-- AndroidManifest.xml -->
<application android:name=".DemoApp">
public class DemoApp extends Application {

    @Override
    public void onCreate() {
        super.onCreate();
        // Replace "example.demo.com" with your tracking subdomain
        EAnalytics.init(this, "example.demo.com", false);
    }
}

The third parameter turns debug logs on (true) or off (false).

Traffic attribution in Eulerian: unlike web tracking, where the URL identifies the site, a native app has no URL. The SDK automatically uses the app’s package name (e.g. com.mycompany.myapp) as the internal URL sent to Eulerian (the ea-appname and url parameters). Eulerian relies on the tracking subdomain passed to init() to attribute the traffic to the right site in its interface.

If several apps share the same tracking subdomain, use the from parameter in the tags to tell them apart.

Tag types

path (the page name) is mandatory on every tag. It is never picked up automatically, unlike on the web where the URL identifies the page. Use a hierarchical convention with | as the separator, for example "home|accueil", "catalogue|chaussures|homme", "tunnel|paiement|confirmation". The value is up to you, but it must be stable and meaningful for reporting.

Generic method set(String key, String value): available on every tag, it lets you add any custom parameter that the dedicated methods do not cover. Example: .set("abonnement", "mensuel").

Generic page · EAProperties

Use it on every page that is not a product, cart, order or quote page (including the homepage and the funnel steps between the cart and the order confirmation). It reports site-centric traffic, page views, visits and natural sources.

Methods:

  • Builder(String path), page name (mandatory)
  • setUID(String uid), internal ID of the logged-in user; consolidates cross-device history and lets a click be reconciled with a download
  • setEmail(String email), the user’s email
  • setProfile(String profile), the user’s profile (e.g. visitor, buyer, looker)
  • setPageGroup(String group), page group for reporting
  • set(String key, String value), free custom parameter
  • setCFlag(SiteCentricCFlag flag), attaches one or more context flags to the tag (see Context Flag )

Example:

EAProperties genericTag = new EAProperties.Builder("home|accueil")
        .setPageGroup("MY-PAGEGROUP")
        .setUID("123asd")
        .setEmail("test@test.fr")
        .setProfile("visitor")
        .set("KEY-CUSTOM-PARAM", "VALUE")
        .build();
EAnalytics.getInstance().track(genericTag);

Product page · EAProducts (1 product)

Tracks product page views and feeds the “Product acquisition & performance” report. A tag counts as a product page when it contains exactly one product reference and none of the parameters scart, estimate, ref, amount.

Methods:

  • Builder(String path), page name (mandatory)
  • setUID(String uid), internal ID of the logged-in user
  • setEmail(String email), the user’s email
  • setProfile(String profile), the user’s profile
  • setPageGroup(String group), page group for reporting
  • addProduct(Product product), adds the product reference (mandatory)
  • set(String key, String value), free custom parameter

Building a Product:

  • Product.Builder(String ref), product reference (mandatory)
  • setName(String name), readable product name for reporting
  • setGroup(String group), product group
  • setParams(Params params), product categories (e.g. prdparam-category, prdparam-brand)

Building a Params:

  • addParam(String key, String value), adds a product category; the key is the suffix after prdparam-

Example:

Params productParams = new Params.Builder()
        .addParam("category", "clothes")   // prdparam-category
        .addParam("brand", "nike")          // prdparam-brand
        .build();

Product product1 = new Product.Builder("ref-product")
        .setName("name-product")
        .setGroup("group-product")
        .setParams(productParams)
        .build();

EAProducts productPage = new EAProducts.Builder("produit|fiche")
        .setPageGroup("my-pagegroup")
        .setUID("123asd")
        .setEmail("test@test.fr")
        .setProfile("looker")
        .addProduct(product1)
        .build();
EAnalytics.getInstance().track(productPage);

Category page · EAProducts (N products)

Sends the first N product references shown on a results or category page to partners for retargeting. A tag counts as a category page when it contains more than one product reference and none of the parameters scart, estimate, ref, amount.

Methods:

  • Builder(String path), page name (mandatory)
  • setUID(String uid), internal ID of the logged-in user
  • setEmail(String email), the user’s email
  • setPageGroup(String group), page group for reporting
  • addProduct(Product product), adds a product reference; repeat for each product shown
  • set(String key, String value), free custom parameter

Example:

Product product1 = new Product.Builder("ref-product1").build();
Product product2 = new Product.Builder("ref-product2").build();
Product product3 = new Product.Builder("ref-product3").build();

EAProducts resultPage = new EAProducts.Builder("categorie|chaussures")
        .setPageGroup("my-pagegroup")
        .setUID("123asd")
        .setEmail("test@test.fr")
        .addProduct(product1)
        .addProduct(product2)
        .addProduct(product3)
        .build();
EAnalytics.getInstance().track(resultPage);

Search engine page · EASearch

Tracks internal search engine queries, the number of results and custom search parameters. A tag counts as a search engine page when it contains isearchengine. Not exclusive: it can be combined with a product reference on the same tag.

Methods:

  • Builder(String path, String engineName), page name + search engine name (mandatory)
  • setResults(int results), number of results returned by the search
  • setParams(Params params), extra search parameters (key/value pairs matching isearchkey/isearchdata)
  • setUID(String uid), internal ID of the logged-in user
  • set(String key, String value), free custom parameter

Example:

Params searchParams = new Params.Builder()
        .addParam("motcle", "veste")
        .addParam("montant_min", "100.00")
        .addParam("montant_max", "400.00")
        .build();

EASearch searchPage = new EASearch.Builder("moteur_interne|veste", "moteur_interne")
        .setUID("34678")
        .setResults(150)
        .setParams(searchParams)
        .build();
EAnalytics.getInstance().track(searchPage);

404 error page · EAProperties

Flag a 404 error page by adding set("error", "1") to any tag. It feeds the “Error pages” report.

Methods:

  • Builder(String path), page name (mandatory)
  • set("error", "1"), flags the page as a 404 error (mandatory)

Example:

EAProperties errorTag = new EAProperties.Builder("erreur|404")
        .set("error", "1")
        .build();
EAnalytics.getInstance().track(errorTag);

Quote page · EAEstimate

Tracks quotes and the products attached to them. A tag counts as a quote page when it contains the ref and estimate parameters, both set automatically by the builder. Quotes are deduplicated by reference: a second call with the same reference is ignored.

Methods:

  • Builder(String path, String ref), page name + unique quote reference (mandatory)
  • setAmount(double amount), total quote amount including tax (decimals separated by a point)
  • setType(String type), quote type according to your own taxonomy
  • setCurrency(String currency), currency, if different from the one configured in the interface
  • addProduct(Product product, double amount, int quantity), adds a product with its unit amount and quantity.
  • setUID(String uid), internal ID of the logged-in user
  • setEmail(String email), the user’s email
  • set(String key, String value), free custom parameter

Example:

Product product1 = new Product.Builder("505").build();

EAEstimate estimatePage = new EAEstimate.Builder("credit|devis", "C4536567")
        .setPageGroup("my-pagegroup")
        .setUID("123asd")
        .setEmail("test@test.fr")
        .setAmount(5000.00)
        .setType("credit_48mois")
        .set("custom-param-KEY", "custom-param-value")
        .addProduct(product1, 5000.00, 1)
        .build();
EAnalytics.getInstance().track(estimatePage);

Cart page · EACart

Tracks started carts and makes it possible to calculate conversion and abandonment rates. A tag counts as a cart page when it contains the scart parameter, set automatically by the builder. A cart lives for a rolling 30 minutes.

Methods:

  • Builder(String path), page name (mandatory)
  • setCartCumul(boolean cumul), false: the tag’s products represent the whole cart (snapshot); true: products accumulate with each successive call
  • addProduct(Product product, double amount, int quantity), adds a product with its unit amount and quantity
  • setUID(String uid), internal ID of the logged-in user
  • setEmail(String email), the user’s email
  • setProfile(String profile), the user’s profile
  • setPageGroup(String group), page group for reporting
  • set(String key, String value), free custom parameter

Example:

Params productParams = new Params.Builder()
        .addParam("category", "T-Shirt")   // prdparam-category
        .addParam("brand", "Nike")          // prdparam-brand
        .build();

Product product1 = new Product.Builder("product-123")
        .setName("product-name")
        .setParams(productParams)
        .build();

EACart cartPage = new EACart.Builder("panier")
        .setPageGroup("my-page-group")
        .setUID("123asd")
        .setEmail("test@test.fr")
        .setProfile("shopper")
        .setCartCumul(false)
        .addProduct(product1, 50.30, 2)
        .build();
EAnalytics.getInstance().track(cartPage);

Order page · EAOrder

Tracks conversions and ROI. A tag counts as an order when it contains ref and amount without scart or estimate. Orders are deduplicated by reference. Implement this tag as early as possible in the payment funnel, so you do not miss it if the user never comes back to the site after the payment platform.

Methods:

  • Builder(String path, String ref), page name + unique order reference (mandatory)
  • setAmount(double amount), total amount including tax, excluding shipping (mandatory)
  • setPayment(String payment), payment method used (e.g. credit card, paypal)
  • setType(String type), sale type according to your own taxonomy
  • setCurrency(String currency), currency, if different from the one configured in the interface
  • setNewCustomer(boolean newCustomer), true: new buyer; false: returning customer
  • setEstimateRef(String ref), reference of the quote linked to this order (optional)
  • addProduct(Product product, double amount, int quantity), adds a product with its unit amount and quantity
  • setUID(String uid), internal ID of the logged-in user
  • setEmail(String email), the user’s email
  • setProfile(String profile), the user’s profile
  • set(String key, String value), free custom parameter

Example:

Params productParams = new Params.Builder()
        .addParam("category", "T-Shirt")   // prdparam-category
        .addParam("brand", "Nike")          // prdparam-brand
        .build();

Product product1 = new Product.Builder("product-123")
        .setName("product-name")
        .setParams(productParams)
        .build();

EAOrder orderPage = new EAOrder.Builder("tunnel|confirmation", "F654335671")
        .setPageGroup("my-pagegroup")
        .setUID("123asd")
        .setEmail("test@test.fr")
        .setProfile("buyer")
        .setNewCustomer(true)
        .setAmount(50.30)
        .setType("online")
        .setPayment("credit card")
        .setCurrency("EUR")
        .setEstimateRef("asd123qwe")
        .set("custom-param-key", "custom-param-value")
        .addProduct(product1, 25.15, 2)
        .build();
EAnalytics.getInstance().track(orderPage);

Merchandising tracking · EATpView / EATpClick

Tracks impressions and clicks on merchandising blocks (recommendation lists, banners and so on). Sent as GET to /tpview/ and /tpclick/, unlike the other tags, which are sent as POST. Supports the same offline retry mechanism as the rest of the SDK.

Methods EATpView (impression):

  • Builder(String path), reference page (mandatory)
  • setSiteName(String name), name of the merchant site
  • setCampaign(String campaign), campaign name
  • setPlacement(String placement), placement of the block on the page
  • addProduct(String ref, Integer position), product reference and its position in the block; repeat for each product shown
  • setUrl(String url), context URL
  • setPublisher(String publisher), publisher (optional)
  • setMedia(String media), media type (optional)
  • setCategory(String category), block category (optional)

Methods EATpClick (click):

  • Builder(String path), reference page (mandatory)
  • setSiteName(String name), name of the merchant site
  • setCampaign(String campaign), campaign name
  • setPlacement(String placement), placement of the block on the page
  • setProduct(String ref, int position), reference and position of the clicked product (mandatory)
  • setProduct(String ref, int position, Integer totalProducts), variant with the total number of products in the block
  • setUrl(String url), context URL
  • setPublisher(String publisher), publisher (optional)
  • setMedia(String media), media type (optional)
  • setCategory(String category), block category (optional)

Example:

// Impression on a merchandising block
EATpView view = new EATpView.Builder("homepage")
        .setSiteName("my-site")
        .setCampaign("summer_sale")
        .setPlacement("banner_top")
        .addProduct("PROD_001", 0)
        .addProduct("PROD_002", 1)
        .setUrl("https://www.example.com")
        .build();
EAnalytics.getInstance().track(view);

// Click on a product in the block
EATpClick click = new EATpClick.Builder("homepage")
        .setSiteName("my-site")
        .setCampaign("summer_sale")
        .setPlacement("banner_top")
        .setProduct("PROD_001", 0)
        .setUrl("https://www.example.com")
        .build();
EAnalytics.getInstance().track(click);

Context Flag (CFLAG) · SiteCentricCFlag

Attach one or more context flags to any tag to enrich your reports with contextual dimensions. A tag accepts at most 10 context flag values, across all dimensions.

Methods SiteCentricCFlag:

  • Builder(), constructor
  • set(String key, String... values), defines a contextual dimension with one or more values

Added to a tag with:

  • setCFlag(SiteCentricCFlag flag), available on every tag type

Example:

import com.eulerian.android.sdk.SiteCentricCFlag;

EAProperties genericTag = new EAProperties.Builder("home|accueil")
        .setUID("UID")
        .setEmail("email@test.fr")
        .setProfile("profile")
        .setCFlag(new SiteCentricCFlag.Builder()
                .set("categorie_1", "rolandgarros", "wimbledon")
                .set("categorie_2", "tennis")
                .set("categorie_3", "usopen")
                .build())
        .build();
EAnalytics.getInstance().track(genericTag);

WebView tracking

For hybrid apps that open a WebView, pass the SDK’s internal identifier in the opening URL so that tracking carries on between the native app and the web session. Also add the edev parameter to flag the traffic as native (mandatory for tracking in-app campaigns and push notifications).

String euidl = EAnalytics.getEuidl();
// Build the WebView URL:
// https://www.example.com/android-landing?ea-euidl-bypass=<euidl>&edev=AppNativeAndroidphone

Accepted values for edev:

ValueDevice
AppNativeAndroidphoneAndroid phone
AppNativeAndroidtabletAndroid tablet
AppNativeIOSphoneiPhone
AppNativeIOStabletiPad

ea-euidl-bypass must be present on every URL change in the WebView, otherwise the link between app and web browsing is lost.

App metrics

Downloads and updates are tracked with the three parameters below. The first two are collected automatically by the SDK on every hit: there is nothing for you to do. The third, ea-appinstalled, is the only one you pass by hand, and only during a migration.

ParameterValueDescription
ea-appnameApp nameApp identifier (must never change), collected automatically by the SDK
ea-appversionVersion stringCurrent version, collected automatically by the SDK
ea-appinstalled1To pass manually if the app existed before the Eulerian integration

System logic:

  • The Download metric is incremented when ea-appname is seen for the first time for this user (without ea-appinstalled).
  • The Update metric is incremented when ea-appname is unchanged but ea-appversion has a new value compared with the last launch.

Migration (app that existed before Eulerian): pass ea-appinstalled with the generic setter, on the first tag sent at launch.

EAProperties migrationTag = new EAProperties.Builder("home|accueil")
        .set("ea-appinstalled", "1")
        .build();
EAnalytics.getInstance().track(migrationTag);

The two modes below are mutually exclusive. Choose one, and never use both in the same app.

Pass the TCString generated by your CMP once per visitor, at the moment the user opts in or out.

EAProperties consentTag = new EAProperties.Builder("univers|rubrique|page")
        .setUID("5434742")
        .set("abonnement", "mensuel")
        .set("gdpr_consent", "EADURF214345")  // your TCString
        .build();
EAnalytics.getInstance().track(consentTag);

Mode 2 · Categories (pmcat)

Pass the Eulerian IDs of the refused categories, separated by -. Send - on its own if the user accepts every category.

EAProperties consentTag = new EAProperties.Builder("univers|rubrique|page")
        .setUID("5434742")
        .set("abonnement", "mensuel")
        .set("pmcat", "1-10")  // IDs of the refused categories
        .build();
EAnalytics.getInstance().track(consentTag);

Example category mapping:

CategoryEulerian ID
analytics1
advertising10
functional19

Example: the user refuses analytics and advertising, so pmcat is 1-10.

General opt-out URL

Provide this URL on your “Privacy / GDPR” page or in your CMP for a full, unconditional opt-out:

https://<votre-domaine-de-collecte>/optout.html?url=<votre-domaine>

Summary

TCF v2 modeCategories mode
Parametergdpr_consentpmcat
WhenAt opt-in/outAt opt-in/out
ContentTCStringRefused IDs or -
CMP compatibilityTCF v2 CMPIn-house / non-TCF CMP

Dependencies

The following dependencies are included automatically with the SDK:

com.google.android.gms:play-services-ads-identifier:17.0.0
com.android.installreferrer:installreferrer:2.2