# Shopify

L’application Commanders Act, disponible dans le [Shopify App Store](https://apps.shopify.com/commanders-act), aide les marchands à fluidifier leurs workflows en connectant les événements Shopify avec des partenaires. Que vous suiviez les interactions clients ou optimisiez les performances publicitaires, notre app simplifie le processus. En interceptant les événements Standard et Custom de Shopify, l’application Commanders Act s’intègre parfaitement à votre stack existante tout en tirant parti de la Shopify Customer Privacy API. Cela signifie moins de configuration manuelle et une collecte de données plus sécurisée.

## Key features

* Connecter [Shopify standard](https://shopify.dev/docs/api/web-pixels-api/standard-events) et les événements custom avec vos partenaires.
* Activer des capacités de tracking server-side fiables via [destinations](https://doc.commandersact.com/getting-started/concepts#destination).
* Garantissez la confidentialité des utilisateurs en prenant en charge [Shopify Customer Privacy API](https://shopify.dev/docs/api/customer-privacy).
* Préserver les données d’événement Shopify d’origine.
* Configuration conviviale.
* Inclure une fonctionnalité de débogage pour le dépannage.

## Configuration de la source

1. Connectez-vous à votre [compte Commanders Act](https://app.commandersact.com/).
2. Dans le menu de gauche, cliquez sur `(1)` `Sources` pour développer la section :\
   \
   ![](/files/720def7837c17018b75ac0aed6486fe28d766f01)\\
3. Cliquez sur `(2)` `Catalogue de sources` :\
   \
   ![](/files/6eaf95fd800829ee7e0a60e9b18983e798e22e11)\\
4. Dans le champ de recherche, saisissez `(3)` "Shopify" et cliquez sur le `(4)` `Shopify web` à droite :\
   \
   ![](/files/a21d3787d4d3065cc4188cb16aa03fce279b6426)\\
5. Cliquez sur `(5)` `Configurez` :\
   \
   ![](/files/8dae9476e4229b3025df49eff9c9e271660f7eb5)\\
6. Saisie `(6)` un nom pour votre source, sélectionnez `(7)` un environnement et cliquez sur `(8)` `Suivant` :\
   \
   ![](/files/000e420172015a87580ccc51c40ada339e397170)\\
7. Si vous avez déjà des destinations en cours d’exécution, vous pouvez les connecter à votre source Shopify en cliquant sur la `(9)` case à cocher du haut ou en `(10)` sélectionnant celle que vous souhaitez lier :\
   \
   ![](/files/465a4e899ef44c4a31fb372062c36ba1c3f79d09)\\
8. Faites défiler jusqu’en bas et cliquez sur `Save`.
9. Prenez note de votre `(11)` `Site/Account Id` et `(12)` `Source Key` :\
   \
   ![](/files/1ca0635b48e788012dc5476264a48fa16993a5a1)\
   \
   Vous allez utiliser les deux valeurs dans la section suivante : [Configuration de l’application](#app-setup).

## Configuration de l’application

1. Ouvrez notre [URL de l’application dans le Shopify App Store](https://apps.shopify.com/commanders-act).
2. Installez l’app en cliquant sur le `(1)` `Install` bouton :\
   \
   ![](/files/d6dc3ea3b9116040506dcbbce9416b3c2a4f44e4)\\
3. Configurez l’app en fournissant à la fois le `(2)` `Site/Account Id` et `(3)` `Source Key` de la source que vous avez créée dans la section [Configuration de la source](#source-setup) (voir l’étape 9 ci-dessus.) puis activez `(4)` le bouton bascule en vert pour activer la configuration de votre app :\
   \
   ![](/files/ca0d917806e403d14e5f512024e9ebbf559a39d2)\\
4. Cliquez sur `Save` pour terminer la configuration et activer l’app. Voir la section suivante [Validez votre configuration](#validate-your-setup) pour vous assurer que le tracking est activé.

{% hint style="info" %}
À tout moment, vous pouvez désactiver l’app en mettant le `(4)` bouton bascule sur off/rouge et cliquez sur `Save` .
{% endhint %}

## Validez votre configuration

1. Connectez-vous à votre [compte Commanders Act](https://app.commandersact.com/).
2. Dans le menu de gauche, cliquez sur (1) `Sources` pour développer la section :\
   \
   ![](/files/720def7837c17018b75ac0aed6486fe28d766f01)\\
3. Cliquez sur (2) `Vue d’ensemble` :\
   \
   ![](/files/fd153e4582a0d8a063daf9c83db12b7288a58cb6)\\
4. Dans le champ de recherche, saisissez (3) le nom de votre source et (4) cliquez dessus :\
   \
   ![](/files/f4237c5b08f90a6e726ce6fab3e89bdcd50ee453)\
   \
   Vous avez peut-être déjà le (5) `Trend` affichant un pic, ce qui signifie que des événements arrivent.
5. Cliquez sur (6) `Event Inspector` :\
   \
   ![](/files/c68ee190c3cb11262406b839f4e88e340f106ee3)\\
6. Vérifiez les logs/entrées signalés.\\

## Référence rapide

{% hint style="info" %}
Le tableau suivant montre le mapping entre les événements Commanders Act et Shopify.\
Les événements custom Shopify sont également transmis à Commanders Act avec le même nom d’événement Shopify d’origine.
{% endhint %}

| Événements Shopify                    | Commanders Act Events                 |
| ------------------------------------- | ------------------------------------- |
| `cart_viewed`                         | `view_cart`                           |
| `checkout_completed`                  | `purchase`                            |
| `checkout_shipping_info_submitted`    | `add_shipping_info`                   |
| `checkout_started`                    | `begin_checkout`                      |
| `collection_viewed`                   | `view_item_list`                      |
| `page_viewed`                         | `page_view`                           |
| `payment_info_submitted`              | `add_payment_info`                    |
| `product_added_to_cart`               | `add_to_cart`                         |
| `product_removed_from_cart`           | `remove_from_cart`                    |
| `product_viewed`                      | `view_item`                           |
| `search_submitted`                    | `search`                              |
| `[Nom de l’événement custom Shopify]` | `[Nom de l’événement custom Shopify]` |

## Mappages de champs

{% hint style="info" %}
Toutes les propriétés Shopify sont récupérées depuis la `événement` property.\
Les données d’événement Shopify d’origine, avec toutes leurs propriétés, sont stockées dans la propriété Commanders Act `partners.shopify.event` .
{% endhint %}

<table data-full-width="true"><thead><tr><th width="682.66650390625">Propriétés Shopify</th><th>Propriétés Commanders Act</th></tr></thead><tbody><tr><td><code>analytics.subscribe(...)</code></td><td><code>event_name</code> <strong>[1]</strong></td></tr><tr><td><p><code>data.checkout.order.id</code></p><p><code>data.element.id</code></p></td><td><code>id</code></td></tr><tr><td><p><code>data.checkout.subtotalPrice.amount</code></p><p><code>data.cartLine.cost.totalAmount.amount</code></p><p><code>data.cart.cost.totalAmount.amount</code></p></td><td><code>valeur</code></td></tr><tr><td><code>data.checkout.totalPrice.amount</code></td><td><code>revenue</code></td></tr><tr><td><code>data.checkout.shippingLine.price.amount</code></td><td><code>shipping_amount</code></td></tr><tr><td><code>data.checkout.totalTax.amount</code></td><td><code>tax_amount</code></td></tr><tr><td><p><code>data.checkout.currencyCode</code></p><p><code>data.cartLine.cost.totalAmount.currencyCode</code></p><p><code>data.cart.cost.totalAmount.currencyCode</code></p></td><td><code>currency</code></td></tr><tr><td><code>context.document.location.href</code></td><td><code>url</code></td></tr><tr><td><code>context.document.title</code></td><td><code>page_title</code></td></tr><tr><td><code>context.document.location.href</code></td><td><code>context.page.url</code></td></tr><tr><td><code>context.navigator.language</code></td><td><code>context.page.lang</code></td></tr><tr><td><code>context.navigator.userAgent</code></td><td><code>context.device.user_agent</code></td></tr><tr><td><code>data.searchResult.query</code></td><td><code>search_term</code></td></tr><tr><td><code>data.checkout.transactions.0.paymentMethod.type</code></td><td><code>payment_method</code> <strong>[2]</strong></td></tr><tr><td><code>data.checkout.discountApplications.X.title</code></td><td><code>coupon</code></td></tr><tr><td><code>data.checkout.order.customer.id</code></td><td><code>user.id</code></td></tr><tr><td><code>data.checkout.order.customer.isFirstOrder</code></td><td><code>user.status</code> <strong>[3]</strong></td></tr><tr><td><p><code>data.checkout.shippingAddress.firstName</code></p><p><code>data.checkout.billingAddress.firstName</code></p></td><td><code>user.firstname</code></td></tr><tr><td><p><code>data.checkout.shippingAddress.lastName</code></p><p><code>data.checkout.billingAddress.lastName</code></p></td><td><code>user.lastname</code></td></tr><tr><td><code>data.checkout.email</code></td><td><code>user.email</code></td></tr><tr><td><p><code>data.checkout.phone</code></p><p><code>data.checkout.shippingAddress.phone</code></p></td><td><code>user.phone</code></td></tr><tr><td><p><code>data.checkout.shippingAddress.address1 + data.checkout.shippingAddress.address2</code></p><p><code>data.checkout.billingAddress.address1 + data.checkout.billingAddress.address2</code></p></td><td><code>user.street</code></td></tr><tr><td><p><code>data.checkout.shippingAddress.city</code></p><p><code>data.checkout.billingAddress.city</code></p></td><td><code>user.city</code></td></tr><tr><td><p><code>data.checkout.shippingAddress.countryCode</code></p><p><code>data.checkout.billingAddress.countryCode</code></p></td><td><code>user.country</code></td></tr><tr><td><p><code>data.checkout.shippingAddress.province</code></p><p><code>data.checkout.billingAddress.province</code></p></td><td><code>user.state</code></td></tr><tr><td><p><code>data.checkout.shippingAddress.zip</code></p><p><code>data.checkout.billingAddress.zip</code></p></td><td><code>user.zipcode</code></td></tr><tr><td><code>data.collection.title</code></td><td><code>item_list_name</code></td></tr><tr><td><p><code>data.checkout.lineItems.X.variant.id</code></p><p><code>data.checkout.lineItems.X.merchandise.id</code></p><p><code>data.checkout.lineItems.X.id</code></p><p><code>data.cart.lines.X.variant.id</code></p><p><code>data.cart.lines.X.merchandise.id</code></p><p><code>data.cart.lines.X.id</code></p><p><code>data.collection.productVariants.X.variant.id</code></p><p><code>data.collection.productVariants.X.merchandise.id</code></p><p><code>data.collection.productVariants.X.id</code></p><p><code>data.searchResult.productVariants.X.variant.id</code></p><p><code>data.searchResult.productVariants.X.merchandise.id</code></p><p><code>data.searchResult.productVariants.X.id</code></p><p><code>data.productVariant.product.id</code></p><p><code>data.cartLine.merchandise.product.id</code></p></td><td><code>items.X.id</code> <strong>[4]</strong></td></tr><tr><td><p><code>data.checkout.lineItems.X.variant.product.title</code></p><p><code>data.checkout.lineItems.X.merchandise.product.title</code></p><p><code>data.checkout.lineItems.X.product.title</code></p><p><code>data.cart.lines.X.variant.product.title</code></p><p><code>data.cart.lines.X.merchandise.product.title</code></p><p><code>data.cart.lines.X.product.title</code></p><p><code>data.collection.productVariants.X.variant.product.title</code></p><p><code>data.collection.productVariants.X.merchandise.product.title</code></p><p><code>data.collection.productVariants.X.product.title</code></p><p><code>data.searchResult.productVariants.X.variant.product.title</code></p><p><code>data.searchResult.productVariants.X.merchandise.product.title</code></p><p><code>data.searchResult.productVariants.X.product.title</code><br><code>data.productVariant.product.title</code></p><p><code>data.cartLine.merchandise.product.title</code></p></td><td><code>items.X.product.name</code> <strong>[4]</strong></td></tr><tr><td><p><code>data.checkout.lineItems.X.variant.price.amount</code></p><p><code>data.checkout.lineItems.X.merchandise.price.amount</code></p><p><code>data.checkout.lineItems.X.price.amount</code></p><p><code>data.cart.lines.X.variant.price.amount</code></p><p><code>data.cart.lines.X.merchandise.price.amount</code></p><p><code>data.cart.lines.X.price.amount</code></p><p><code>data.collection.productVariants.X.variant.price.amount</code></p><p><code>data.collection.productVariants.X.merchandise.price.amount</code></p><p><code>data.collection.productVariants.X.price.amount</code></p><p><code>data.searchResult.productVariants.X.variant.price.amount</code></p><p><code>data.searchResult.productVariants.X.merchandise.price.amount</code></p><p><code>data.searchResult.productVariants.X.price.amount</code><br><code>data.productVariant.price.amount</code></p><p><code>data.cartLine.merchandise.price.amount</code></p></td><td><code>items.X.product.price</code> <strong>[4]</strong></td></tr><tr><td><p><code>data.checkout.lineItems.X.quantity</code></p><p><code>data.cart.lines.X.quantity</code></p><p><code>data.collection.productVariants.X.quantity</code></p><p><code>data.searchResult.productVariants.X.quantity</code><br><code>data.cartLine.quantity</code></p></td><td><code>items.X.quantity</code> <strong>[4]</strong></td></tr><tr><td><p><code>data.checkout.lineItems.X.variant.product.vendor</code></p><p><code>data.checkout.lineItems.X.merchandise.product.vendor</code></p><p><code>data.checkout.lineItems.X.product.vendor</code></p><p><code>data.cart.lines.X.variant.product.vendor</code></p><p><code>data.cart.lines.X.merchandise.product.vendor</code></p><p><code>data.cart.lines.X.product.vendor</code></p><p><code>data.collection.productVariants.X.variant.product.vendor</code></p><p><code>data.collection.productVariants.X.merchandise.product.vendor</code></p><p><code>data.collection.productVariants.X.product.vendor</code></p><p><code>data.searchResult.productVariants.X.variant.product.vendor</code></p><p><code>data.searchResult.productVariants.X.merchandise.product.vendor</code></p><p><code>data.searchResult.productVariants.X.product.vendor</code></p><p><code>data.productVariant.product.vendor</code></p><p><code>data.cartLine.merchandise.product.vendor</code></p></td><td><code>items.X.product.brand</code> <strong>[4]</strong></td></tr><tr><td><p><code>data.checkout.lineItems.X.discountAllocations.Y.amount.amount</code></p><p><code>data.cart.lines.X.discountAllocations.Y.amount.amount</code></p><p><code>data.collection.productVariants.X.discountAllocations.Y.amount.amount</code></p><p><code>data.searchResult.productVariants.X.discountAllocations.Y.amount.amount</code></p></td><td><code>items.X.discount</code> <strong>[4]</strong></td></tr><tr><td><p><code>data.checkout.lineItems.X.discountAllocations.Y.discountApplication.title</code></p><p><code>data.cart.lines.X.discountAllocations.Y.discountApplication.title</code></p><p><code>data.collection.productVariants.X.discountAllocations.Y.discountApplication.title</code></p><p><code>data.searchResult.productVariants.X.discountAllocations.Y.discountApplication.title</code></p></td><td><code>items.X.coupon</code> <strong>[4]</strong></td></tr><tr><td><code>analyticsProcessingAllowed</code></td><td><code>analyticsProcessingAllowed</code> <strong>[5]</strong></td></tr><tr><td><code>marketingAllowed</code></td><td><code>marketingAllowed</code> <strong>[5]</strong></td></tr><tr><td><code>preferencesProcessingAllowed</code></td><td><code>preferencesProcessingAllowed</code> <strong>[5]</strong></td></tr><tr><td><code>saleOfDataAllowed</code></td><td><code>saleOfDataAllowed</code> <strong>[5]</strong></td></tr><tr><td><code>[Données d’événement Shopify d’origine]</code></td><td><code>partners.shopify.event</code></td></tr></tbody></table>

{% hint style="info" %}

> **\[1]** Voir la référence rapide pour plus de détails.\
> \&#xNAN;**\[2]** Voir les valeurs prises en charge [ici](https://doc.commandersact.com/developers/tracking-and-integrations/tracking/events-reference#payment-methods).\
> \&#xNAN;**\[3]** Défini avec "New".\
> \&#xNAN;**\[4]** Valeur basée sur la liste de priorité dans la colonne de gauche.\
> \&#xNAN;**\[5]** Propriété définie à partir du chemin de base `partners.shopify.userConsent`.
> {% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://doc.commandersact.com/fr/fonctionnalites/sources/sources-catalog/web/cashopapp.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
