Use this short script to credit every HeavySet Tech lead or appointment on metv.com to your marketing campaign.
1. Prerequisites
| ✔ | You have a HeavySet Tech form (iframe/widget) already embedded. | | ✔ | metv has supplied your unique pixel URL for attribution. | | ✔ | You can edit the page HTML. |
2. Add the script
Copy the snippet below.
Replace
<YOUR-PIXEL-URL>with the exact URL provided by metv.Paste the code after your HeavySet Tech embed—ideally just before
</body>.
<script>
/* fire once per page-view */
function fireMediaPixel() {
if (window.__heavysetPixelFired) return;
window.__heavysetPixelFired = true;
const url = '<YOUR-PIXEL-URL>'; /* provided by metv */
const img = new Image(1, 1);
img.referrerPolicy = 'no-referrer';
(window.__pixelImgs ||= []).push(img); /* keep reference */
img.src = url;
}
/* listen for HeavySet events */
window.addEventListener('message', (event) => {
if (!event.origin.includes('heavyset.tech')) return;
const t = event.data?.type;
if (t === 'leadSubmission' || t === 'appointmentSubmission') fireMediaPixel();
});
</script>3. Test it
Publish the page.
Submit a test lead or appointment.
In DevTools → Network, filter by your pixel URL and confirm it returns HTTP 200 or 304.
If the request is missing, verify that:
The pixel URL is correct.
The script sits below the form embed.
If you’re not yet using HeavySet Tech, you can schedule a live demo here to see how our platform can benefit your business.
Comments
0 comments
Please sign in to leave a comment.