Using Clerk.io in Your Store

Working with Multiple Currencies in your Shopify Store

Make sure your revenue data is seamlessly translated to your Clerk.io dashboards when using multiple currencies in your webshop. 

Note: This article is for converting currencies for use in your Clerk.io dashboards. For information on converting currencies to be displayed in your Shopify store, click here

Overview

When using multiple currencies in your Shopify webshop, it's important that orders are translated into one currency to make sure your revenue-related performance is accurate in Clerk.io.

In the Clerk.io dashboards, your performance will always be reported in one currency. For example, if you use both GBP and DKK in your webstore, your dashboards will report performance all in GBP or all in DKK. This is why translating to one currency is important-- after all, you wouldn't want a 600 GBP purchase read by Clerk.io as 600 DKK!

Converting Currencies in Shopify

To make sure your Clerk.io Dashboards show your sales data as one common currency, this can be adjusted within the Sales Tracking code you added to your store when you originally installed Clerk.io.

Head to Settings > Checkout > Additional Scripts in the Shopify backend, and change the Sales Tracking code from this:


<span
class="clerk"
data-api="log/sale"
data-sale="{{ order_name }}"
data-customer="{{ customer.id }}"
data-email="{{ customer.email }}"
data-products='[{% for line_item in line_items %}{% if forloop.index0 > 0 %}, {% endif %} {"id": {{ line_item.product.id }},"quantity": {{line_item.quantity}},"price": {{line_item.price | divided_by: 100.00}} }{% endfor %}]'> </span>

To this:


<span
class="clerk"
data-api="log/sale"
data-sale="{{ order_name }}"
data-customer="{{ customer.id }}"
data-email="{{ customer.email }}"
data-products='[{% for line_item in line_items %}{% if forloop.index0 > 0 %}, {% endif %} {"id": {{ line_item.product.id }},"quantity": {{line_item.quantity}},"price": {{line_item.price | money_without_currency | divided_by: 100.00}} }{% endfor %}]'>
</span>

Be sure to keep the Visitor Tracking Script the same-- this is found just below the Sales Tracking code. Your orders should now flow through to the Clerk.io dashboards as one currency.