Skip to main content
Skip table of contents

Linking to your Tracking Page

Identify your URL structure

If you've used our Shopify Theme App or Malomo.js to create your tracking page, identify your base URL for your tracking page. If you've used our Shopify Theme App or Malomo.js to host your tracking page and used a page titled “Order Tracking”; in this case, your base URL would look like: https://yourbrand.com/pages/order-tracking.

If your tracking page was built by the Malomo implementation team and is currently hosted by Malomo, your URL structure will look like this: https://yourbrand.mymalomo.com/xxxxx/.

Set your Default Tracking Page URL

Our integrations use the Default Tracking Page URL set in the Malomo Dashboard to share your live tracking page with your customer. To set this page, go to Malomo > Account > Overview and look for the Default Tracking Page URL section. If this section is blank, please add in the full URL of your live tracking page. If you have multiple live tracking pages, please select the page you would like to assign as the default tracking experience.

To learn more about setting or reviewing your default tracking page, check out this article.

Link to the Tracking Page in Shopify notifications

If you're using Shopify's notifications for events like Shipment Confirmed, Out for Delivery, or Delivered, you can include a link to your tracking page instead of the default order status link from Shopify.

Edit the Shopify notifications with the code below to change where you direct your customers. The code below will not change the look or functionality of the message; it will only direct customers to the tracking page, instead of the carrier's tracking page.

Steps

1. Navigate to the Settings page in your Shopify Admin and click Notifications. Scroll down and click into the Shipping Confirmation email.

2. Copy and paste the following code at the top (line 1) of the "Email body (HTML)” in Shopify:

CODE
{% comment %} START MALOMO {% endcomment %}

{% comment %} Base URL for Malomo tracking page, e.g. "https://example.mymalomo.com" {% endcomment %}
{% assign malomo_base_url = "ADD_BASE_URL_HERE" %}

{% if fulfillment.tracking_company %}
  {% capture carrier %}{{ fulfillment.tracking_company }}{% endcapture %}
{% endif %}

{% if carrier and carrier != blank and carrier != "Other" %}
  {% capture tracking_url %}{{ malomo_base_url }}/?_m_alt_id={{ order.id }}&_m_tracking_code={{ fulfillment.tracking_numbers.first }}{% endcapture %}
{% elsif order_status_url %}
  {% capture tracking_url %}{{ order_status_url }}{% endcapture %}
{% endif %}
{% comment %} END MALOMO {% endcomment %}

3. Replace the example base URL (https://yourbrand.com/pages/order-tracking in the HTML above) with your actual base URL.

4. Next search the email code for anywhere that uses this variable: {{ fulfillment.tracking_url }}

and replace it with: {{ tracking_url }}

5. Click Save.

6. Repeat this process for Shipping Update, Out for Delivery, and Delivered emails.

Link to the Tracking Page in Klaviyo emails

If you send your Shipping Confirmation, Delivery, or other messages out of Klaviyo, you can reference the Tracking Page link from any event-driven flow. Build the link for the "Track My Package" button using the {{ event.extra.order.url }} variable. This will automatically pull in the the customer's dynamic tracking page, based on your Default Tracking Page URL. Check out this article for additional options.

Link to the Tracking Page in Attentive

To link customers to your tracking page in Attentive Journeys, build the link for the "Track My Package" button using the {order.url} variable. This will automatically pull in the the customer's dynamic tracking page, based on your Default Tracking Page URL. Check out this article for additional options.

Link to the Tracking Page in Postscript

To link customers to your tracking page in Postscript Automations, build the link for the "Track My Package" button using the {order.url} variable. This will automatically pull in the the customer's dynamic tracking page, based on your Default Tracking Page URL. Check out this article for additional options.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.