> For the complete documentation index, see [llms.txt](https://community.commandersact.com/customer-success/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://community.commandersact.com/customer-success/faqs/entreprise-tag-management/sdk.md).

# SDK

<details>

<summary>How do I initialise the ServerSide module?</summary>

Here's how to do it:

<img src="/files/qEsMoZukKLaf2er7ms4p" alt="" data-size="original">

The following parameters must be entered:&#x20;

* siteID sourceKey&#x20;
* defaultBehaviour&#x20;
* Event (optional)

[https://github.com/CommandersAct/tcserverside-flutter-plugin/blob/master/lib/tc\_serverside.dart <br>](<https://github.com/CommandersAct/tcserverside-flutter-plugin/blob/master/lib/tc_serverside.dart&#xD;&#xA;>)

</details>

<details>

<summary>How do I get my siteID and sourceKey?</summary>

Here's how to obtain these 2 pieces of information:

* siteID: corresponds to your workspace ID on the Commanders Act platform&#x20;
* sourceKey: you obtain this by creating the Flutter source, from the Source => Create menu on the Commanders Act platform.

\*If necessary, a Commanders Act consultant can help you obtain these 2 identifiers.

</details>

<details>

<summary>What is defaultBehaviour used for?</summary>

This is used to determine how you wish to initialise the ServerSide module.

3 values are possible

* PB\_DEFAULT\_BEHAVIOUR : method to use if you do not have the consent module.
* PB\_ALWAYS\_ENABLED : the module is active before consent is given. This allows events to be sent before the user has given consent.
* PB\_DISABLED\_BY\_DEFAULT: the module is deactivated before consent, it will be activated after the user has accepted cookies (optin)

<img src="/files/ipHHjTjhXjQYxcfSV9LE" alt="" data-size="original">

</details>

<details>

<summary>Does my datalayer have to be the same for my website and my app?</summary>

This is good practice!

We strongly recommend that you use the same datalayer for both the web application and the mobile application. We recommend that you use our standardised nomenclatures&#x20;

<https://community.commandersact.com/platform-x/developers/tracking/events-reference>

The main benefit: a single destination to configure for both sources! Your destination configuration will be recognised by both web and mobile.

</details>

<details>

<summary>Why send an event as soon as the module is initialised?</summary>

This is used to send an event prior to consent (recommended for consent-exempt destinations).

This can be a standard Commanders Act event (recommended) or it can be a custom event, depending on your needs.

<https://community.commandersact.com/platform-x/developers/tracking/events-reference>

<https://github.com/CommandersAct/tcserverside-flutter-plugin/tree/master/lib/events>

<img src="/files/SOJVaPurGcjJv9SOnxki" alt="" data-size="original">

</details>

<details>

<summary>Can I use additional parameters?</summary>

Yes, it's possible!

All you have to do is add them to the standard properties.

\*Make sure you use them correctly on the Commanders Act platform.

Example:

<img src="/files/gqVltjDTumYNJxguUNkF" alt="" data-size="original">

</details>

<details>

<summary>Can I create custom events?</summary>

Yes, it's possible! For more information, see this section of our documentation <https://github.com/CommandersAct/tcserverside-flutter-plugin/blob/master/lib/events/TCCustomEvent.dart>

\*Don't forget to name your event: here in the example it's called 'super'.

<img src="/files/PrwTu040qq8Gx7ZfNnCF" alt="" data-size="original">

</details>

<details>

<summary>Can I add persistent variables?</summary>

Yes, it's possible! If you need to define a persistent variable, please refer to this documentation : <https://github.com/CommandersAct/tcserverside-flutter-plugin/blob/master/lib/tc_serverside.dart>

<img src="/files/FXqtL0ipBQjpw6d1rJug" alt="" data-size="original">

\*You must define the 'key' and 'value' parameters yourself.

Defining a persistent variable: This is a key/value system, the value of which will remain the same forever. (example: Google Account ID)

</details>

<details>

<summary>How can I obtain IDFA/AAID?</summary>

Our SDK no longer automatically collects IDFA/AAID, but we offer a simple method for capturing this information.

Android .

<img src="/files/3JDJRB12PDF34stiF2V2" alt="" data-size="original">

<https://github.com/CommandersAct/AndroidV5/tree/master/TCServerSide#getting-aaid>

iOS .

<img src="/files/jAv6hN8c5OthWpzHZNtW" alt="" data-size="original">

<https://github.com/CommandersAct/iosV5/tree/master/TCServerSide#getting-idfa>

</details>
