Skip to main content

GrowRamp Integration

Track GrowRamp affiliate sales back to your ads in Cometly. Step-by-step setup for the pixel, Initiate Checkout, and the GrowRamp postback so every GrowRamp payout is attributed to the ad that earned it.

This guide connects your GrowRamp account to Cometly. When you're done, Cometly will show you, for every ad you run: how many people landed on your page, how many clicked through to the offer, how many bought, and how much GrowRamp paid you. That means you can finally see which ads make you money and which ones burn it.


Read this first: you need a page you own

Cometly attributes a GrowRamp sale to an ad by matching the buyer to the visitor who clicked your ad. To do that, Cometly gives each visitor an ID the moment they land on a page that has the Cometly pixel. That ID rides along to GrowRamp when the visitor clicks your offer link, and GrowRamp sends it back to Cometly when the sale is reported.

If your ads link straight to your GrowRamp tracking link, there is no page for the pixel to run on, so no ID is ever created. GrowRamp records the click, redirects the visitor to the vendor's page, and reports the sale, but there is nothing for Cometly to match it to. The sale will show up in Cometly as revenue, but it will say "Unattributed."

No URL parameter, sub ID, or ad-platform macro changes this. Typing an ad name, {{ad.id}}, or {click.id} into a GrowRamp sub field does not create a Cometly ID. It only sends that text back to you.

What counts as a page you own: any page where you can paste code into the head and footer. A simple page with a headline, a few lines and one button to your GrowRamp link is enough. This is what most successful media buyers run anyway.

If you work directly with the vendor, they can host a page dedicated to your traffic and add the three scripts from this guide to it. This only works if the button on that page goes out through your GrowRamp tracking link. If your ads hit the GrowRamp link first and it redirects to the vendor, the click is already recorded before any page loads, and this option does not apply.

Running without a page anyway? Do Steps 5, 6, 7 and 9 only. Skip Steps 1, 3 and 4, since there is no page of yours to put those scripts on. Your GrowRamp sales will still show up in Cometly as revenue, but they will stay "Unattributed."


What goes on your landing page

Three scripts. Everything else in this guide is configuration in Cometly and GrowRamp.

Where

What

Step

Head

The Cometly pixel, copied from your own Cometly account

Step 1

Footer

The View Content event (two lines). Only for the page your ads send people to.

Step 3

Footer

The Cometly affiliate script, which attaches the visitor's ID to your offer links

Step 4

Nothing else goes on the page. Do not add the affiliate script to any page that is not yours.

There are 9 steps. Do them in order. Don't skip any.


Step 1: Put the Cometly pixel on your landing page

Why: The pixel is what lets Cometly see visitors on your page. Every other step in this guide depends on it. No pixel, no tracking.

  1. Log in to Cometly.

  2. In the left menu, click Setup.

  3. Click Install Cometly Pixel.

  4. Click Copy Code. This copies your pixel. It is unique to your account, so always copy it from your own Cometly screen. It looks like this, with your own ID in place of YOUR_ID:

    <script src="https://js.comet-serve.com/script.js?uid=YOUR_ID"></script>
  5. Open your landing page in your page builder. Find the box for head code. Depending on your builder it may be called "Header code", "Custom head code", or "Tracking codes > Head".

  6. Paste the pixel into that box. Save and publish your page.

  7. Go back to the same Cometly screen. Type your landing page's domain into the domain box, exactly the way it looks in your browser. If your browser shows www., type the www. too.

  8. Click Add Domain. Then click Test Script, then Confirm.

  9. You want to see Verified. If you see Failed, the code is not in the head of your page. Go back to number 5 and try again.

If your page builder has an option to load head scripts "async" or "deferred", leave it off for the pixel. The scripts in Steps 3 and 4 need the pixel to be ready first.


Step 2: Add Cometly parameters to your ads

Why: This is how Cometly knows which ad sent each visitor. Without it, Cometly sees your visitors but can't tell you which ad deserves the credit, and your reports will say "Unattributed."

These parameters go on the ad that points at your landing page. Copy the line for the ad platform you use.

Meta / Facebook Ads:
Open your ad in Ads Manager. Scroll down to the Tracking section. Paste this into the URL parameters box:

comet_source={{site_source_name}}&comet_ad_id={{ad.id}}&comet_placement={{placement}}

TikTok Ads:
Open your ad. Find URL builder, then Custom parameters. Add this:

comet_source=tiktok&comet_ad_id=__CID__

Google Ads:
Open your campaign. Go to Campaign settings > Additional settings > Campaign URL options. Paste this into the Tracking template box:

{lpurl}?comet_source=google&comet_network={network}&comet_campaign={campaignid}&comet_ad_group={adgroupid}&comet_ad_id={creative}&comet_keyword={keyword}

Do this for every ad or campaign that sends people to your landing page. Need more help with this step? See Setup URL Parameters For All Channels.

About GrowRamp's sub IDs

GrowRamp's Tracking & Asset Generator lets you add source_id and sub1 through sub10 to your tracking link. Those are separate from the Cometly parameters above, and there are three rules:

  • sub1 through sub7 are yours. Use them for your own ad and creative labels, or leave them blank. Cometly does not read them.

  • sub8 is reserved for Cometly. Never type anything into it. The script in Step 4 fills it in automatically for every visitor. If you put anything there yourself, you overwrite the visitor's ID and the sale cannot be attributed.

  • Never use {click.id}. It is not a Meta macro. It arrives at GrowRamp as the literal text {click.id} and does nothing.


Step 3: Add the View Content event to your landing page

Only if your ads send people to a landing page you own. If your ads go straight to your GrowRamp link, skip this step. The View Content event goes on the landing page itself, the page your ads point to. Not your homepage, not a thank-you page, and never the vendor's page.

Why: This records a View Content every time someone lands on your page. That gives you two things. First, you see how many landing page views each ad actually produced, not just what the ad platform claims. Second, it powers your LP CTR%: out of everyone who clicked your ad, the percentage who actually loaded your page. A low LP CTR% means clicks are being lost before your page even shows, from slow load times, broken links, or junk clicks. Without this event, LP CTR% is always zero.

  1. Open the landing page your ads send people to in your page builder.

  2. Find the box for footer code. Depending on your builder it may be called "Body end code", "Footer code", or "Before </body>".

  3. Copy this and paste it into that box:

<script>
comet('view_content');
</script>

Save and publish your page.


Step 4: Add the Cometly affiliate script to your landing page

Why: Here's the problem this solves. The sale doesn't happen on your page. It happens on GrowRamp's side, minutes or hours later. So Cometly needs a way to recognize that the person who bought is the same person who clicked your ad. This script does that: it quietly attaches the visitor's Cometly ID to your offer links as sub8. When GrowRamp reports the sale, that ID comes back with it, and Cometly matches the sale to the exact ad that brought the visitor.

Don't worry about this script breaking your page. If the pixel is missing, or a visitor has no Cometly ID, the script simply does nothing. It never changes anything else on your page.

You need to make one small edit to the script before you paste it. Here's how.

4a. Figure out where your offer button points

Open your landing page, right-click your offer button, choose Copy link address, and look at what you copied.

Setup 1: your button goes straight to your GrowRamp tracking link. The copied link is the one from GrowRamp's Tracking & Asset Generator, something like:

https://www.example.com/ABC123/DEF456/?sub1=Ad1&sub2=Creative1

This is the most common setup. Your domain for the script is the part between https:// and the next /. In this example:

www.example.com

Include the www. if your link has it. Write it down and go to 4b.

Setup 2: your button goes to a page the vendor controls, and their page has the GrowRamp tracking link. The copied link is some other website, something like:

https://offer.example.net/watch-video

Here the visitor's Cometly ID has to make an extra hop: your page attaches it to the vendor link, and the vendor's page has to carry it forward onto the tracking link. That only works if the vendor's page passes URL parameters through. Test it before you continue. It takes one minute:

  1. Open the vendor's page in your browser with ?sub8=TEST123 added to the end of the address, like this: https://offer.example.net/watch-video?sub8=TEST123

  2. On the vendor's page, right-click their offer button and choose Copy link address.

  3. Look for sub8=TEST123 in the copied link.

If it's there: great, the vendor passes parameters through. Your domain for the script is the vendor page's domain. In this example: offer.example.net. Write it down and go to 4b.

If it's not there: ask the vendor: "Can you pass incoming URL parameters through to your tracking links?" This is a standard request in affiliate marketing and most vendors know exactly what it means. Until they do it, sales from that funnel can't be matched to your ads.

4b. Edit and paste the script

Here is the script:

<script>
(function () {
// Replace ONLY the text between the quotes on the next line:
var NETWORK_DOMAIN = 'PASTE-YOUR-TRACKING-DOMAIN-HERE';

// Tidy the domain in case it was pasted with https:// or a trailing path.
var domain = String(NETWORK_DOMAIN).trim().toLowerCase()
.replace(/^https?:\/\//, '').split('/')[0];

function addTokenToLinks() {
try {
if (typeof cometToken !== 'function') return;
var token = cometToken();
if (!token) return;
var links = document.querySelectorAll('a[href]');
for (var i = 0; i < links.length; i++) {
try {
var href = links[i].href;
if (new URL(href).hostname !== domain) continue;
var hashAt = href.indexOf('#');
var hash = hashAt >= 0 ? href.slice(hashAt) : '';
var base = hashAt >= 0 ? href.slice(0, hashAt) : href;
var qAt = base.indexOf('?');
var path = qAt >= 0 ? base.slice(0, qAt) : base;
var query = qAt >= 0 ? base.slice(qAt + 1) : '';
var kept = [];
var parts = query.split('&');
for (var j = 0; j < parts.length; j++) {
if (parts[j] && parts[j].split('=')[0] !== 'sub8') kept.push(parts[j]);
}
kept.push('sub8=' + encodeURIComponent(token));
links[i].href = path + '?' + kept.join('&') + hash;
} catch (e) {}
}
} catch (e) {}
}

// Wait for the Cometly pixel to be ready, then tag the links.
var tries = 0;
function whenPixelReady() {
if (typeof cometToken === 'function') { addTokenToLinks(); return; }
if (tries++ < 40) setTimeout(whenPixelReady, 250);
}

if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', whenPixelReady);
} else {
whenPixelReady();
}
window.addEventListener('load', addTokenToLinks);
})();
</script>

  1. Copy the whole script into a notes app.

  2. Find the line near the top that says PASTE-YOUR-TRACKING-DOMAIN-HERE.

  3. Replace only that text with the tracking domain you wrote down in 4a. Keep the quote marks. Touch nothing else.

Using our example, that line would now look like this:

var NETWORK_DOMAIN = 'www.example.com';

Paste the edited script into the same footer code box from Step 3, right below the View Content script.

Save and publish your page.

4c. Check it worked

  1. Open your landing page in your browser.

  2. Right-click your offer button and choose Copy link address.

  3. Paste it into a notes app. The link should now end with sub8= followed by a long number:

https://www.example.com/ABC123/DEF456/?sub1=Ad1&sub2=Creative1&sub8=39871234561209874563

That long number is the visitor's Cometly ID riding along to GrowRamp. See the sub8=? You're good. Move on.

Don't see it? Check these three things:

  1. The domain you typed into the script must match your tracking link's domain exactly, including www. if your link has it. Compare them letter by letter.

  2. The pixel from Step 1 must be in the head of the page.

  3. The script must be in the footer, and the page must be published.


Step 5: Get your Cometly webhook link

Why: A webhook link is a private address where GrowRamp will report your sales to Cometly. Think of it as Cometly's mailbox for GrowRamp. You're about to hand that address to GrowRamp in Step 6.

  1. In Cometly's left menu, click Events Manager.

  2. Click Create Event.

  3. Click Select Webhooks.

  4. Choose Purchase as the event and click Create. The new event appears in your events list.

  5. Click Configure next to it. Cometly shows you your link on the Receive Data step. It looks something like this:

https://comet-serve.com/YOUR_SPACE_ID/webhook/YOUR_WEBHOOK_ID

The two long strings in the middle are unique to your account. Always copy the link from your own Cometly screen, never from this article.

Copy your link into a notes app. You need it in Step 6.

Keep this Cometly tab open. You come back to it in Step 7.


Step 6: Add the Purchase postback in your GrowRamp dashboard

Why: A postback is GrowRamp's way of reporting a sale the moment it happens. Right now GrowRamp isn't telling anyone. In this step you tell it: "every time I make a sale, report it to my Cometly link, and include the sale amount and the visitor's Cometly ID."

  1. Log in to your GrowRamp dashboard.

  2. In the left menu, click Postbacks.

  3. Click + Postback (top right).

  4. Set these three options:

    • Level: Global (this means: report sales from all my offers, not just one)

    • Type: Conversion (this means: report sales)

    • Method: Postback

  5. Now build the URL. Take your Cometly link from Step 5 and add this text to the very end of it, with no space in between:

?comet_token={sub8}&amount={payout_amount}&order_id={conversion_id}&idempotency_key={conversion_id}&event_time={timestamp}&offer_name={offer_name}&email=

That text is the list of details you want GrowRamp to include with each sale: the visitor's Cometly ID, your payout, an order number, and the time.

So if your Cometly link was:

https://comet-serve.com/YOUR_SPACE_ID/webhook/YOUR_WEBHOOK_ID

Your finished URL is:

https://comet-serve.com/YOUR_SPACE_ID/webhook/YOUR_WEBHOOK_ID?comet_token={sub8}&amount={payout_amount}&order_id={conversion_id}&idempotency_key={conversion_id}&event_time={timestamp}&offer_name={offer_name}&email=

Paste your finished URL into the URL box.

Click Save.

Three things people get wrong here:

  • Don't edit the parts in curly braces like {sub8} or {payout_amount}. They are placeholders. GrowRamp fills them in automatically with each sale's real values.

  • The email= at the very end, with nothing after it, is correct. Leave it exactly like that.

  • If your GrowRamp rep sets the postback up for you, send them this exact URL. The names on the left of each = (comet_token, amount, order_id, idempotency_key, event_time) must stay exactly as written. A postback that says click_id={sub1} instead of comet_token={sub8} will not attribute.


Step 7: Tell Cometly what the data means

Why: GrowRamp is now sending sale reports to Cometly, but Cometly doesn't yet know what each piece means. In this step you label the pieces once: "this one is the sale amount, this one is the visitor ID." After that, every future sale is understood automatically.

  1. Go back to the Cometly tab from Step 5.

  2. Click Check for Data. Cometly is now waiting to receive something.

  3. Send it a test sale:

    • Message your GrowRamp rep: "Can you run a postback test on my Purchase postback? I need it to fire once so I can map the fields in Cometly." GrowRamp has a built-in test tool on their side that fires your postback with a fake click and sale. This is a normal request.

    • If your GrowRamp dashboard shows a Test Conversion button on the offer, that works too.

  4. Within a minute, a record appears in Cometly. Select it and click Continue With Selected Record.

  5. You are now on Configure Mapping. You see Cometly's fields with a dropdown next to each one. Set them exactly like this:

Cometly field

Pick this from the dropdown

Email

email

Event Time

event_time

Comet Token

comet_token

Amount

amount

Order Id

order_id

Idempotency Key

idempotency_key

This is the row that makes attribution work. Comet Token is not on the screen by default. Click Add Field, choose Comet Token, then pick comet_token from the dropdown. The sample value next to it should be a long number. That is the visitor's Cometly ID that came in through sub8. If it shows an ad label, {click.id}, or nothing at all, stop and go back to Step 4c. Without this row, every sale will say "Unattributed."

Amount, Order Id and Idempotency Key are added the same way: Add Field, pick the Cometly field, then pick the matching dropdown value.

About Email: affiliate offers almost never include customer info, so the email field will be empty. That is completely normal. You're promoting someone else's product, so GrowRamp doesn't share the buyer's details with you. Cometly doesn't need them: it matches the sale using Comet Token instead. Map Email to the empty email field and move on. Do not map Email to comet_token or to any other field to "fill it in." That breaks the match. The only exception: if you work directly with a vendor and their postback includes the buyer's email, map Email to that field instead.

Then click Save & Continue. A Filtering screen appears. Skip it, don't add anything, and click Activate.


Step 8: Track Initiate Checkout (clicks to the offer)

Why: this records an Initiate Checkout every time someone clicks from your page through to the offer. Together with View Content from Step 3, this completes your funnel: ad clicks, landing page views, clicks to the offer, sales. Now you can tell exactly where you're losing people. Lots of page views but few clicks to the offer? Fix your page. Lots of offer clicks but few sales? The problem is the offer, not you.

It works the same way as Steps 5 to 7, just for clicks instead of sales.

  1. In Cometly, go to Events Manager > Create Event > Select Webhooks, and this time choose Initiate Checkout. Click Create, then Configure next to the new event. Copy the link it gives you. This is a different link from the one in Step 5.

  2. In your GrowRamp dashboard, go to Postbacks and click + Postback again. Set:

    • Level: Global

    • Type: CPC (might be called Click. This means: report clicks instead of sales)

    • Method: Postback

  3. Take your new Cometly link and add this to the very end, no space:

?comet_token={sub8}&order_id={transaction_id}&idempotency_key={transaction_id}&event_time={timestamp}&offer_name={offer_name}&email=

Paste the finished URL into the URL box. Click Save.

Back in Cometly, click Check for Data. Then open your own landing page and click your offer link to send a test click.

Map the fields the same way you did in Step 7, including adding the Comet Token row with Add Field: Email to email, Event Time to event_time, Comet Token to comet_token, Order Id to order_id, Idempotency Key to idempotency_key. There is no Amount for clicks.

Click Save & Continue, skip Filtering, and click Activate.

Don't see a CPC or Click option when creating the postback? It may be turned off for your account. Ask your affiliate manager: "Can you enable click postbacks on my account?" And if they can't, no problem: skip this step. Your Purchase tracking from Steps 5 to 7 still works completely. You just won't see clicks to the offer in your funnel.


Step 9: Connect your ad accounts

Why: everything so far tracks what you earn. This step pulls in what you spend, so Cometly can put the two side by side and show you profit and return per ad.

  1. In Cometly's left menu, click Integrations.

  2. Click Connect next to the platform you advertise on (Meta, TikTok, or Google).

  3. Log in and pick your ad account.

You're done. Every sale GrowRamp approves now shows up in Cometly as a Purchase, with your payout as the revenue, attached to the exact ad that earned it. View Content and Initiate Checkout show you where people drop off along the way, and your ad spend sits right next to it all.


How long until I see data?

GrowRamp reports a sale within seconds of approving it. Cometly reports usually catch up within an hour.

One thing to know: if GrowRamp later reverses or changes a sale, Cometly keeps the original. Each sale is reported only once.


Something's not working

Nothing shows up in Check for Data (Step 7)

  • In your GrowRamp dashboard, open the postback and make sure it is Active.

  • Compare your postback URL against Step 6 character by character. The most common mistake is a missing ? between your Cometly link and comet_token.

  • Sales that are still pending approval may not be reported until GrowRamp approves them. Ask your rep to run a postback test.

Purchases show up in Cometly but say "Unattributed"

  • Start in GrowRamp: go to Reporting > Postback. Each row shows the exact URL GrowRamp sent to Cometly. Look at the comet_token= value.

    • A long number: the ID arrived. Check that the ad that sent the visitor has the Step 2 parameters on it.

    • Empty: the script in Step 4 isn't attaching the ID. Go back to 4c.

    • An ad label, {click.id}, or anything typed by hand: something is writing into sub8. Clear sub8 in the Tracking & Asset Generator and in any ad URL, and re-copy your links.

  • Make sure the pixel from Step 1 is in the head, and the scripts from Steps 3 and 4 are in the footer.

  • Make sure your ads point at your landing page, not straight at the GrowRamp link. If a visitor never loads your page, there is nothing to attach the sale to. See "Read this first" at the top.

No View Content showing

  • The Step 3 script is not in the footer, or the Step 1 pixel is missing from the head.

No Initiate Checkout showing

  • Initiate Checkout comes from GrowRamp's click report (Step 8), not from your page. Check that the CPC/Click postback exists and is Active, and that your offer links carry sub8= (Step 4c).

The same purchase shows up twice

  • Make sure Idempotency Key is mapped to idempotency_key in Step 7.

Revenue is $0

  • GrowRamp may hide payout amounts on postbacks. Ask your affiliate manager: "Can you enable payout visibility on my postbacks?"

I set this up earlier using sub1 instead of sub8

  • It still works. GrowRamp sends back whichever sub your postback names. You only need to move to sub8 if you want to use sub1 for your own labels. If you do, change the script (Step 4b), the postback (Step 6), and the click postback (Step 8) together, all on the same day.

My offer doesn't allow a landing page

  • Then Cometly cannot attribute those sales to ads. It will still receive them through the postback, so your revenue totals are right, but they will stay "Unattributed." Two options: ask the vendor for a page dedicated to your traffic that you can add the three scripts to, or put a simple page of your own in front. There is no parameter-only workaround.

Did this answer your question?