Documentation menuCourses and communities: Podia

Courses and communities

Add Loogika to Podia

You add Loogika to Podia by pasting the script tag into the Website tracking code field under Settings, then Analytics. Every public page of the Podia site loads that code, and so do the checkout pages. The Third-party code setting is part of the Mover and Shaker plans.

Last updated .

What do you need before you start?

Copy your script tag from Site Settings in Loogika, under the Tracking Script tab. It looks like this, with your own site ID in place of YOUR_SITE_ID:

<script src="https://app.loogika.com/api/script.js?siteId=YOUR_SITE_ID" defer></script>

Your Podia site must be on the Mover or Shaker plan. On the free plan Podia does not show the Third-party code option.

How do you add Loogika to Podia?

The tag goes into the Third-party code setting in the Admin area.

  1. Start at your home feed, select the name of your site and pick Admin.
  2. Go to Settings, then Analytics, in the sidebar of the Admin area.
  3. Click Edit next to Third-party code.
  4. Paste the tag into the Website tracking code field.
  5. Click Save.

Podia has no separate publish step for tracking code, so the tag is live once you save. Podia places custom code at the end of the body, right ahead of the closing </body> tag, and not in the head. Because the Loogika tag carries defer, either position gives the same result.

Which Podia pages does Loogika track?

Loogika tracks every public page of your Podia site and the checkout pages. Podia does not run website tracking code inside logged-in areas, so three parts of a site stay out of your reports:

  • The customer dashboard
  • The product viewer
  • Community spaces

How do you track a Podia purchase as an event?

Paste a short script into the Conversion tracking code field, which sits directly below Website tracking code. The thank-you page that follows a purchase or a membership signup is the only place where Podia runs code from that field.

On the thank-you page Podia makes the order available as an object named Podia.Conversion. The script below reads the order and sends it to Loogika as an event named purchase:

<script>
(function () {
  var c = window.Podia && window.Podia.Conversion;
  if (!c) return;
  var payload = {
    product: c.object.name,
    order_id: c.object.order_id,
    value: c.revenue,
    currency: c.currency
  };
  var start = Date.now();
  (function send() {
    if (window.loogika && typeof window.loogika.event === "function") {
      return window.loogika.event("purchase", payload);
    }
    if (Date.now() - start < 8000) setTimeout(send, 150);
  })();
})();
</script>

The script retries every 150 milliseconds for up to eight seconds. Podia runs conversion code before the deferred Loogika tag has finished loading, so the first attempt often comes too early.

A free product or a free membership plan gives revenue the value 0. Those orders arrive in Loogika with a value of 0.

How do you check that Loogika is installed?

Open your Podia site in a private browser window, or log out of Podia first, and click through a few pages. The pageviews show up in the Loogika dashboard within a few seconds.

The private window matters on Podia. While your own Podia account is logged in, Podia leaves the tracking code out, so a test from your normal window shows nothing.

Why does Podia not send data to Loogika?

SymptomCause and fix
The Third-party code option is not shownYour site uses the free plan. Only Mover and Shaker include Third-party code
No pageviews while you testYour own Podia account is still logged in. Log out, or run the test from a private window
Pages for logged-in members are missingPodia runs custom code only on public pages and checkout
The purchase event arrives twiceKeep the event script in Conversion tracking code only, not also in Website tracking code. Podia provides Podia.Conversion a single time, when the thank-you page first loads, so reloading that page sends no second event