Skip to guide
Docs & Help
Ctrl / ⌘ K
Installation guides

How to install Attriboo on Django

Add Attriboo to the base HTML template used by your Django pages. Template inheritance can then include one tracking script wherever that shared document is rendered.

Instructions reviewed

Before you start

You need access to the Django templates and deployment. This method is for pages rendered as HTML, not a Django REST API alone. A separate React or Vue frontend needs the guide for that frontend.

Add the published domain in Attriboo. Keep one tracking installation and preserve your site’s consent choices. Your website ID is public; private API keys do not belong in the page script.

Copy the script for this website

  1. Choose your website in Attriboo.

    Check the address in the website selector. Add the website first if it is not listed.

  2. Open Setup and choose Django.

    Under Add the tracking script to your website, find Where is your site built? Choose this platform, then use Copy beside Your code. This gives you the right code format with your website ID filled in.

Add Attriboo to Django

Find this setting

  1. Django templates
  2. Shared base.html
  3. Inside <head>
  4. Deploy
  1. Find the base template that contains head, often templates/base.html.

    Confirm that your public templates extend it.

  2. Paste the HTML script from Setup before </head>, outside any optional head block that child templates replace.

    Keep template tags and existing blocks intact.

  3. Deploy and refresh any template/CDN caches used by your site.

    Open a public page and follow a link to another page.

Code format example. Copy your filled-in version from Attriboo Setup.
<script defer data-site-id="site_YOUR_WEBSITE_ID" src="https://www.attriboo.com/t.js"></script>

Check this platform’s behavior

A child template that overrides the entire head can remove the script. Keep the tracker in the shared outer document, or preserve the parent block with block.super where appropriate. A fragment-only response is not another complete page installation.

Check that page visits reach Attriboo

  1. Open the published website in another tab.

    Use the address your customers visit. Make your normal tracking choice if a consent banner appears.

  2. Return to the same website in Attriboo → Setup.

    Select Test Connection. Look for a successful result such as Verified Live or activity on the correct address.

  3. Follow an internal link, then use your browser’s Back button.

    Check those paths in the Pages view for the current reporting dates. Allow the reports to refresh. An active connection alone does not confirm every page change.

Connect visits to recorded revenue

Installing the script records website activity. To bring sales into Attriboo, connect the service you use to collect payments in Setup as well. Then compare the recorded sources and customer journeys behind your sales.

A payment imported from before tracking was installed may have no matching visit. Installing today does not recreate old website activity.

Django references

These placement instructions were reviewed against the platform’s documentation and Attriboo’s current tracker. Check the published site after deployment, theme changes or navigation changes.

You are done when

The published Django site loads one Attriboo tracker and the expected page visits reach the selected website. Sales reporting is checked separately.

Still need a hand?

Send a question without needing to sign in.

Open support form