Littledata’s app embed

Updated on 2024-07-01

What is an app embed?

App embed blocks are customizable components provided by apps that can be embedded into the Shopify theme.

They allow apps to inject functionality directly into the theme without requiring manual code changes. Littledata needs this functionality to load tracking scripts

Why add Littledata's app embed

tip:

If you installed Littledata before June 2024, you'll be prompted to add our app embed when you login.

Littledata updated our tracking script to use an app embed in June 2024.

This is an improvement on the previous script-tag implementation

Benefits of an app embed

  • Seamless integration

    • Easily add and manage analytics through the Shopify theme editor without touching the theme code.
  • Improved loading speed

    • Optimized loading ensures better performance compared to script tags.

    • Using app embeds, the script is loaded faster not needing to wait for other assets in the theme code.

    • In our tests using average internet speed, results state that the app embed has reduced the loading time of the trackers by ~94%.

      • App embed loading time: ~400ms
      • Script tag loading time: ~6.6s
  • Improved security

    • App embeds are managed by Shopify's backend, offering more secure and reliable script injection.

When to enable the app embed?

  • After installing our app and getting past the paywall, you will be prompted to enable the Littledata App embed

Littledata's in-app guide to enable the app embed

  • If you are completely moving to a different theme, you will need to reactivate Littledata's app embed following the video or the steps mentioned below.
  1. From your Shopify admin, under Sales Channels click Online Store to open the dropdown and select Themes.

  1. Find your current theme and click Customize.

  1. Once you open the editor, in the left hand menu, select App Embeds.

  1. Search for Littledata and enable it. Make sure to Save, on the top right corner.

Dashboard script states

In our dashboard, you can notice one of the three different states of our tracking script:

  1. Tracking script detected

    Litteldata's app embed is enabled; no action needed.

  1. New tracking script available

    We've noticed that your store is on an older version of the tracking script; click "Update now" and follow the guide on how to enable Littledata's app embed.

  1. Missing tracking script

    We've detected that Littledata's app embed is disabled; click "Fix this" and follow the guide on how to re-enable Littledata's app embed.

How to check if the app embed is loaded

Go to your store's source code and look for littledata-revenue-tracking/blocks/LittledataLayer. Our script should be displayed there, if not make sure you've followed the installation steps precisely.

If you have the Segment app installed, in the store's source code look for segment/blocks/LittledataLayer