<commit_before># Tagging plan for iOS

## Webview app tracking

About the navigation in a //webview// type of app on iOS (html/js standard website), our internal ID must be provided once the URL opens in order to guarantee the tracking.
To retrieve this value, the technical support of the client must use the following function in our SDK:

  * iOS - Swift:
```xml
let euidl = EAnalytics.euidl
```

  * iOS - ObjectiveC:
```xml
NSString *euidl = [EAnalytics euidl];
```

Once the value is in the parameter **ea-euidl-bypass**, the cookies system is modified in order to use the euidl from the app.

**Example:**

```xml
http://www.vpg.fr/ios-landing-webview?ea-euidl-bypass=$euidl_de_l_app
```

If the ea.js detects a parameter, it will automatically use it and store it during the entire session in order to stop the website from sending it again every time the user visits the page.\\
Once this parameter is passed, the tracking of an IOS app in a webview context is the same as for a classic website.

The documentation available [here] (https://eulerian.wiki/doku.php?id=en:collect:technical_implementation:general) contains all the information to implement our tags in the JavaScript.

## Native app tracking

In the case of a native app, our SDK must be added to the code of the app in order to integrate the following marker:

```xml
let genericTag = EAProperties(path: "|univers|rubrique|page")
genericTag.setEulerianWithUid("5434742")
genericTag.setEulerianWithEmail("<EMAIL>")
genericTag.setEulerianWithProfile("visitor")
genericTag.setEulerianWithPageGroup("pagegroup")
genericTag.setEulerianWithValue("mensuel", forKey: "abonnement")
EAnalytics.track(genericTag)
```

Our **SDK** has been designed to help its integration by offering an easy structure and a detailed documentation.

The parameters and possibilities are the exact same as for our tag collector. Therefore, you will be able to follow the different navigation routes and to compare them to your classic website, integrating the same variables.

The calls generated by these tags are very similar to the calls generated by the classic collectors, and they have been conceived to be as light as possible so they do not disturb the functioning of the app.

Some parameters of our collector are specific to a mobile app tracking. To know more about this, you can check [this documentation] (https://eulerian.wiki/doku.php?id=en:collect:technical_implementation:parameters_list).

Note: Also, our SDK is able to gather an unlimited number of offline interactions and to send them when the user is online.  This process allows us to keep tracking of the user even if they are using the app offline. The navigation is registered and reassigned a posteriori through the parameter ereplay-time.


### Traffic assignation rule

In a classic website, out system identifies and assigns the traffic according to the calling **URL**. However, in the case of an app we do not have access to this information.

Therefore, to define the traffic attribution rule, we will take into account the tracking subdomain used and passed as a parameter **init** on the Eulerian Analytics page:

```xml
EAnalytics.logDebug(true)
EAnalytics.initialize(DOMAINE_DE_TRACKING)
```

Note: This also means that if you use the same tracking subdomain for several apps, they will have to be differentiated by adding the parameter [from] (https://eulerian.wiki/doku.php?id=en:collect:technical_implementation:parameters_list) in the markers. This will happen automatically in a hybrid app which shares some pages with your website.

It is also important to know that the absence of a URL means also the absence of the name page by default. The parameter [path] (https://eulerian.wiki/doku.php?id=en:collect:technical_implementation:parameters_list) is not optional but __obligatory__ for the tracking of an app.

The traffic generated by your app can be tracked and checked in Eulerian’s website, or be combined with the traffic from a different website. As shown before, if your app changed to webview mode, it will be obligatory for some pages to add the parameter [from] (https://eulerian.wiki/doku.php?id=en:collect:technical_implementation:parameters_list) so the traffic is properly redirected to our system. 

## Downloads and updates 

Associated parameters: 
  * **ea-appname**: NOM_APPLICATION , it is the name of the app. It must not change
  * **ea-appversion**: VERSION_APPLICATION, it is the version of the app
  * **ea-appinstalled**: 1, it must be added to all users who have downloaded the app before the update of the calling URL containing the two parameters above <commit_msg>update description appinstalled<commit_after># Tagging plan for iOS

## Webview app tracking

About the navigation in a //webview// type of app on iOS (html/js standard website), our internal ID must be provided once the URL opens in order to guarantee the tracking.
To retrieve this value, the technical support of the client must use the following function in our SDK:

  * iOS - Swift:
```xml
let euidl = EAnalytics.euidl
```

  * iOS - ObjectiveC:
```xml
NSString *euidl = [EAnalytics euidl];
```

Once the value is in the parameter **ea-euidl-bypass**, the cookies system is modified in order to use the euidl from the app.

**Example:**

```xml
http://www.vpg.fr/ios-landing-webview?ea-euidl-bypass=$euidl_de_l_app
```

If the ea.js detects a parameter, it will automatically use it and store it during the entire session in order to stop the website from sending it again every time the user visits the page.\\
Once this parameter is passed, the tracking of an IOS app in a webview context is the same as for a classic website.

The documentation available [here] (https://eulerian.wiki/doku.php?id=en:collect:technical_implementation:general) contains all the information to implement our tags in the JavaScript.

## Native app tracking

In the case of a native app, our SDK must be added to the code of the app in order to integrate the following marker:

```xml
let genericTag = EAProperties(path: "|univers|rubrique|page")
genericTag.setEulerianWithUid("5434742")
genericTag.setEulerianWithEmail("<EMAIL>")
genericTag.setEulerianWithProfile("visitor")
genericTag.setEulerianWithPageGroup("pagegroup")
genericTag.setEulerianWithValue("mensuel", forKey: "abonnement")
EAnalytics.track(genericTag)
```

Our **SDK** has been designed to help its integration by offering an easy structure and a detailed documentation.

The parameters and possibilities are the exact same as for our tag collector. Therefore, you will be able to follow the different navigation routes and to compare them to your classic website, integrating the same variables.

The calls generated by these tags are very similar to the calls generated by the classic collectors, and they have been conceived to be as light as possible so they do not disturb the functioning of the app.

Some parameters of our collector are specific to a mobile app tracking. To know more about this, you can check [this documentation] (https://eulerian.wiki/doku.php?id=en:collect:technical_implementation:parameters_list).

Note: Also, our SDK is able to gather an unlimited number of offline interactions and to send them when the user is online.  This process allows us to keep tracking of the user even if they are using the app offline. The navigation is registered and reassigned a posteriori through the parameter ereplay-time.


### Traffic assignation rule

In a classic website, out system identifies and assigns the traffic according to the calling **URL**. However, in the case of an app we do not have access to this information.

Therefore, to define the traffic attribution rule, we will take into account the tracking subdomain used and passed as a parameter **init** on the Eulerian Analytics page:

```xml
EAnalytics.logDebug(true)
EAnalytics.initialize(DOMAINE_DE_TRACKING)
```

Note: This also means that if you use the same tracking subdomain for several apps, they will have to be differentiated by adding the parameter [from] (https://eulerian.wiki/doku.php?id=en:collect:technical_implementation:parameters_list) in the markers. This will happen automatically in a hybrid app which shares some pages with your website.

It is also important to know that the absence of a URL means also the absence of the name page by default. The parameter [path] (https://eulerian.wiki/doku.php?id=en:collect:technical_implementation:parameters_list) is not optional but __obligatory__ for the tracking of an app.

The traffic generated by your app can be tracked and checked in Eulerian’s website, or be combined with the traffic from a different website. As shown before, if your app changed to webview mode, it will be obligatory for some pages to add the parameter [from] (https://eulerian.wiki/doku.php?id=en:collect:technical_implementation:parameters_list) so the traffic is properly redirected to our system. 

## Downloads and updates 

Associated parameters: 
  * **ea-appname**: NOM_APPLICATION , it is the name of the app. It must not change
  * **ea-appversion**: VERSION_APPLICATION, it is the version of the app
  * **ea-appinstalled**: 1, This parameter indicates that no new installation is counted for this call.
It is used to manage the initialization of users who already have the application before the integration of Eulerian.
This parameter can be supplied permanently, in parallel with appversion and appname, as long as the application considers that it has already been launched previously on this device/user.
{'fraction_non_alphanumeric': 0.06353533235479136, 'fraction_numerical': 0.001677500524218914, 'mean_word_length': 4.995600251414205, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 10, 'lorem ipsum': 0, 'www.': 2, 'xml': 10}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4964202', 'n_tokens_mistral': 2538, 'n_tokens_neox': 2420, 'n_words': 1301}