> 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="https://1613709692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0zW0zvGDZaiNuIFweCtu%2Fuploads%2FNXHlpR5SzMhfWlrrN9ag%2FSSV1.png?alt=media&amp;token=c312e6db-5bd9-4e6d-80e4-6a16382f3c1d" 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="https://1613709692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0zW0zvGDZaiNuIFweCtu%2Fuploads%2Fwjf5fINSa5wl1a7xnjcS%2FSSV2.png?alt=media&amp;token=8b279f5c-e4cf-4d01-8114-9013c46819f3" 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="https://1613709692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0zW0zvGDZaiNuIFweCtu%2Fuploads%2Fm1OH4pRujFI9mioINhJo%2FSSV3.png?alt=media&amp;token=11c2f47a-4a08-4469-b221-947e30984ff6" 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="https://1613709692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0zW0zvGDZaiNuIFweCtu%2Fuploads%2Faf38M9f65d8DJ3ZYNd3d%2FSSV4.png?alt=media&amp;token=72187d8e-edc3-4ece-b476-cf5432c91e70" 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="https://1613709692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0zW0zvGDZaiNuIFweCtu%2Fuploads%2FsaTkTRgx2XzMlxMUu0O7%2FSSV5.png?alt=media&amp;token=255c431c-c3f0-4a66-8439-f8c6f9f141d7" 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="https://1613709692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0zW0zvGDZaiNuIFweCtu%2Fuploads%2FHoF5pWQp7lKvRMhkXpiz%2FSSV6.png?alt=media&amp;token=7cd5b0d7-e1c0-44ab-a129-faea84719f2e" 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="https://1613709692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0zW0zvGDZaiNuIFweCtu%2Fuploads%2FCJ4UFG0oIOm9D1agtrFo%2FsdkFAQ1.png?alt=media&amp;token=e0d61cb5-3da0-4140-b221-1d26f71187d2" alt="" data-size="original">

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

iOS .

<img src="https://1613709692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0zW0zvGDZaiNuIFweCtu%2Fuploads%2FDeZ1afHl15PcmpsSciPC%2FsdkFAQ2.png?alt=media&amp;token=406c96de-9e8c-491b-89eb-2850d0c79916" alt="" data-size="original">

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

</details>
