Skip to main content

No-code analytics for end-customers

Overview

In this guide, you will learn how to embed a link to a no-code analytics page in order for you customers to:

  1. View shipment emissions analytics
  2. Explore emission estimates for their shipments
  3. Understand how individual estimates were calculated.

Who is this guide for?

This guide is aimed at Sustainability Specialists or Product Managers.

Feel free to contact our support team if you encounter any issues.

overview

Requirements

  1. Create Client Accounts with handles
  2. Calculate emission estimates through Client Accounts
  3. Mark emission estimates as shipments

Create Client Accounts with handles

In order for your customers to have their own analytics and individual emission estimates pages, you are required to create a Client Account for each customer. Client Accounts can be created via API or Logistics CSV spreadsheet.

For Client Account details follow this link.

When creating a Client Account provide a handle. The handle must be unique per organisation and can only contain lowercase alphanumeric characters, underscore and dashes.

Note: you may re-use the same handle in live mode and test mode.

  • The handle is defined by clients to uniquely identify their customers.

    It is URL friendly, therefore it can be included in links.

  • client-accounts-with-handles

    Calculate emission estimates through Client Accounts

    Emission estimates must be performed with a specific Client Account.

    To act as a Client Account

    • via the API through single or multi-leg requests, clients can issue requests using the Lune-Account header.
    • via the Logistics CSV spreadsheet, provide a handle in the client_account_handle column. Client Accounts are created if required.

    calculate-via-client-accounts

    Mark emission estimates as shipment

    Emission estimates are not always performed for shipments. For instance, you may perform estimates during the booking flow.

    In order for the analytics page to display analytics for shipments, emission estimates must be marked as shipments, by setting the is_shipment variable.

    This can be done via the API or the Logistics CSV spreadsheet.

    mark-as-shipment

    Client Account analytics URL

    Each of your customer is representated by a distinct Client Account and therefore gets its own analytics and individual emission estimates pages.

    Because the handle was define by you, you are able to construct the URL for your customer's analytics page.

    The URL is as follows:

    https://sustainability.lune.co/logistics/<ORG_ID>/<HANDLE>

    Where:

    • <ORG_ID> is your organisation id. This value does not change. Your id can be copied from your settings page.
    • <HANDLE> is the handle defined by you.

    Note: for test Client Accounts use the following url: https://sustainability.lune.co/logistics/test/<ORG_ID>/<HANDLE>.

    client-account-analytics-url

    Embed the URL in your app

    Once you've constructed the URL, you can embed it in a link or button within your app. We recommend opening a new tab or window.

    This enables your customers to:

    1. view emissions analytics
    2. explore emission estimates for their shipments
    3. understand how individual estimates were calculated.

    analytics-embed-url