Skip to main content

How to Install analytics.js on a Framer Website for Soundee Tracking

Kevin avatar
Written by Kevin
Updated over a week ago

If you're embedding the Soundee player on your Framer site, you'll want to make sure tracking, Facebook Pixel, URL parameters (?snd_track=), and eCommerce events work as expected.

To do that, you need to correctly install analytics.js — and avoid a common mistake Framer users make.


🚀 What You’ll Learn

  • How to correctly embed the Soundee player on Framer

  • Where to add the analytics.js script

  • How to verify if it's working


✅ Step 1: Copy Your Embed Code from Soundee

In your Soundee Studio, go to:

Studio → Stores → Your Page → Embed Player

There you’ll see the full HTML embed code. It looks like this:

<!-- Begin Soundee (DO NOT EDIT) -->
<!-- Analytics Script -->
<script src="https://pagebuilder-cdn.soundee.com/analytics.js"></script> <!-- End Analytics Script -->
<!-- Embed -->
<iframe id="soundee_player" frameborder="0" src="https://14.soundee.com" allow="autoplay" style="width: 100%; height: 600px; margin: 0px auto; display: block; max-width: 980px; max-height: 96vh; border-radius: 3px; box-shadow: rgba(0, 0, 0, 0.16) 0px 5px 40px;" ></iframe>
<!-- End Embed -->
<!-- End Soundee -->


✅ Step 2: Paste Only the <iframe> into Framer’s Embed Block

In Framer:

  1. Set the Type to HTML.

  2. Paste only the <iframe> part of the code, like this:

<iframe id="soundee_player" frameborder="0" src="https://14.soundee.com" allow="autoplay" style="width: 100%; height: 600px; margin: 0px auto; display: block; max-width: 980px; max-height: 96vh; border-radius: 3px; box-shadow: rgba(0, 0, 0, 0.16) 0px 5px 40px;" ></iframe>

✅ Step 3: Paste the <script> in Framer’s Custom Code (Head)

Now go to:

Framer → Settings → Custom Code → Head (before </head>)

Paste this there:

<script src="https://pagebuilder-cdn.soundee.com/analytics.js"></script>


⚠️ Why This Matters

Framer wraps Embed HTML inside an internal iframe (srcdoc), which breaks most scripts if they’re not on the top-level page. That causes:

  • Tracking to fail

  • Facebook Pixel and marketing events to break

  • URL params like ?snd_track= to do nothing

  • Checkout / payments to show permission errors

By separating the <script> into the Head, and embedding only the <iframe> directly, Soundee’s analytics.js works perfectly.


✅ Step 4: Verify It’s Working

Open your live Framer site, then:

  1. Right-click → Inspect

  2. Go to the Console tab

  3. Look for this message:

Soundee events initialized!

Need Help?

Still not working? Message Soundee Support or DM us on IG — we’re happy to help you get everything set up properly.

Did this answer your question?