Intro

Load Cloudflare Zaraz manaully

Allows you to load Cloudflare Zaraz manually without auto-injection. This will allow you to prerender pages without triggering Zaraz script.

Actions

  • zaraz_load

    Loads Zaraz script onto your page. Add this action to On load event on every page then put in the domain/subdomain that is proxied by Cloudflare.

    Put your domain into targetDomain to only load Zaraz on that domain. This will prevent zaraz to load in the Toddle editor and previews.

    If your domain is already proxied by Cloudflare, you can put your domain name in the subdomain argument. If not, you will need to create a separate subdomain, proxied by Cloudflare and use that instead.

    P.S. Make sure to turn off "Auto-inject script" in Zaraz settings to prevent double firing.

    Arguments

    targetDomainExample: yourdomain.com
    subdomainExample: zaraz.yourdomain.com
  • zaraz_track

    Call zaraz.track() to capture custom events.

    Arguments

    eventNameName of the event (String)
    eventPropertiesProperties to pass along with the event (Object)