1. Knowledge Base
  2. Analyzing Results

Tagging Orders by Test Group in Shopify

In this article:


Background

By default, when an order is created in Shopify, while an Intelligems test is running, there are a few ways that Intelligems will show up on the order within your Shopify admin portal - you can read more on what those are here. One thing that will not show up by default is which test or test groups a customer was in. You can always get this information by using our order export feature, but by following the below steps to setup a Shopify Flow, you will automatically get a tag on your Shopify orders to give you this information. 

✨ You will have to set up a Shopify Flow for each test as they are based on the unique Test Group IDs that are assigned to each test group.

Step 1: Confirm that the 'Add Test Group Id' setting is toggled on.

Before completing any other steps, confirm that the "Add Test Group Id" setting is toggled on. This setting is available under "Advanced Settings" on the "Settings" page in the Intelligems app. If you do not see this section, please reach out to support@intelligems.io for help enabling it. 

Step 2: Reach out to Intelligems Support to request your Test Group IDs.

For every test set up in the Intelligems app, each test group receives a unique ID. While these IDs are not currently available in the Intelligems app, our support team is happy to pull them from our database for you. Please reach out to support@intelligems.io to request these IDs. In your email, please include the name of the test(s) you need the test group IDs for.

Step 3: Set up a workflow up in Shopify Flow.

If you have not already, download the Shopify Flow app here. Once you are in the app:

1. Click "Create workflow" in the top right, followed by "Select a trigger". 

2. For the trigger, select "Order created". 

3. Click the blue plus sign in the  "Order created" card and select "Condition".

4. Click "Add criteria" > "Order" > "lineItems" > "customAttributes" > "value".

5. Change the "Equal to" dropdown to "Includes" and paste the string you received from Intelligems Support in Step 2 in the "Value" box. 

6. Click the blue plus sign next to "Then" in the  "Check if..." card and select "Action". 

7. Click "Add order tags" and type the tag you would like to add to the orders for this test group(s). This tag will be added to all orders completed in this test group(s) in Shopify. When it's done, your Shopify Flow should look similar to the below.

8. Click "Turn on workflow" in the top right.