RevCent Track.js
Overview and details on RevCent's custom domain tracking.
All RevCent users have access to our in house tracking system, called Track.js. By inserting javascript code onto each of your websites, you can track visitors across multiple domains until they ultimately make a purchase. Track.js is essential for tracking conversions in RevCent as well as providing more information for Fraud Detections.
We highly recommend you read about the enhanced conversion tracking capabilities RevCent offers on our Conversion Tracking page.
Important: Only domains that you have added to your Tracking Domains, with DNS successfully completed, will have tracking enabled. RevCent does not blindly track across the internet, we must know that the domain being tracked is from a specific RevCent user. Make sure you have Create A Tracking Domain and successfully set up DNS tracking before installing the tracking snippet.
Why Use Track.js?
- Track.js enables you to track from initial visit to final purchase for visitors across all of your domains.
- Attach any type of metadata to a visitor and have it persist even after a purchase is made.
- Regardless of acquisition channel, you can accurately track conversions using Track.js custom url parameters.
- Provides more information for Fraud Detections, enabling future prevention.
View Tracking Domains
View your tracking domains by clicking Tracking > Domain > Domains in the sidebar, or go to https://revcent.com/user/tracking-domains.
![]()
Create A Tracking Domain
Create a new tracking domain by clicking New domain when viewing all tracking domains or go to https://revcent.com/user/new-tracking-domain. Enter its details, then click Create domain.
![]()
Name
Enter a name for the tracking domain.
Description
Enter a description for the tracking domain.
Status
Set the status for the tracking domain.
Domain
Enter the registrable root domain you control, such as example.com or example.co.uk. Enter just the domain: www.example.com is a subdomain and https://example.com is a URL. Check the spelling before you select Create domain: the domain value cannot be changed after creation.
Once the tracking domain is created you will be forwarded to the Edit Tracking Domain page for the new tracking domain.
Edit A Tracking Domain
Edit an existing tracking domain by clicking the edit icon when viewing all tracking domains. If you have not successfully set up DNS, please do so.
Details
![]()
Name
Enter a name for the tracking domain.
Description
Enter a description for the tracking domain.
Status
Set the status for the tracking domain.
URL Parameter Set
To capture selected query parameters, attach a reusable URL Parameter Set, or use Manual URL parameters → Add URL parameter in Details. Save your changes. A set is optional.
Tracking Code
Open DNS & SSL and copy the tracking code from Install tracking code after setup is complete. The code is specific to the domain being modified; do not copy tracking code from other domains.
Note: If you are using our WordPress plugin, you do not need to embed this script. However, you will need to enable DNS tracking in the RevCent Payment Plugin settings. More Info
DNS
Required. In order to for RevCent to track visitors, you must set up DNS for each domain you wish to track.
Browsers have begun preventing third party cookies for tracking as well as cross domain cookie usage. This is going to be the standard moving forward, so first party cookies are needed for accurate tracking capabilities. First party cookies are cookies set by the domain the visitor is visiting. By correctly setting up DNS for your tracking domain, you allow RevCent to set first party cookies when embedding the tracking script on a domain.
Please follow the steps below to successfully enable DNS and first party cookies in RevCent.
Things to Note:
- There is an additional $1 monthly charge in RevCent for each tracking domain that has DNS enabled.
- Have access to the authoritative DNS provider for the domain (the provider named by its nameservers, which may differ from the registrar). Use the values from your domain, never the sample values in these screenshots.
- Tracking and the customer portal use two service hosts. Your existing storefront can stay on its current host: leave its root, wildcard and other website records alone. If you received a migration notice, use the existing-domain instructions.
Open DNS & SSL
Open the existing domain and select DNS & SSL. Follow the four steps in order. The SSL and DNS badges at the top show progress for this domain.
![]()
Step 1: Add A Records
- In Add A records, find
rctrk(visitor tracking) andportal(customer portal). Both A records point to the IPv4 address assigned to this particular Tracking Domain. For API users,CreateTrackingDomainreturns these rows in its top-levela_recordsarray;GetTrackingDomainreturns them ina_records. - If the table or array is empty, there is no address to publish yet. Refresh the domain. If Retry setup appears, follow its guidance, including waiting for any previous domain cleanup to finish. Do not guess the address.
- At your authoritative DNS provider, inspect the existing entries. Create or update the two exact service records with the names and values from your panel. If your provider appends the zone name automatically, enter just
rctrkandportalso the domain is not appended twice. - Once both names resolve publicly to the assigned address, select Verify A records and initialize SSL in Step 1. If verification fails, compare both public answers with the panel and allow time for DNS changes to propagate.
![]()
Step 2: Validate SSL Certificate
- Open Validate SSL certificate. If the certificate request is pending but there is no CNAME yet, use Check SSL status in this step to retrieve it. Wait and check again if necessary.
- Copy the supplied CNAME name and value to your authoritative DNS provider. Once it resolves publicly, use Check SSL status again. Continue when SSL shows Issued. Leave the validation CNAME in place while the certificate is in use so managed renewal can continue.
- If validation fails or times out, check the public A records and the full CNAME name and target, including whether your provider appended the zone twice. If the domain restricts certificate issuance with CAA records, follow the panel’s guidance to allow Amazon to issue both standard and wildcard certificates. After correcting DNS, use Reset SSL when offered for a failed or timed-out validation. Start again at Step 1 and use the validation record the panel now shows.
![]()
Step 3: Finalize DNS
Once SSL shows Issued, select Verify DNS and finalize setup in Finalize DNS integration. RevCent checks the A and CNAME records and activates routing. DNS can remain Pending after the request: refresh the domain, inspect the status and follow the action shown in Step 3. If verification reports a mismatch, correct that record at your DNS provider. Proceed to Step 4 when DNS shows Complete and the tracking code is available.
![]()
DNS Complete
In Step 4, Install tracking code, copy the snippet for this domain and place it immediately before the closing </body> tag on each page you want to track. If you use the RevCent WordPress plugin, enable DNS tracking instead of inserting the snippet manually.
![]()
Existing domains with a DNS migration notice
Open the existing Tracking Domain named in your RevCent notice and select DNS & SSL. It can already show DNS Complete while public DNS still points to the previous address.
At the authoritative DNS provider, compare the A records for both rctrk and portal with the address currently assigned in the panel. Update any differing targets by the cutoff in your notice. After propagation, look up each full hostname publicly (for example, dig +short A rctrk.example.com and dig +short A portal.example.com, substituting your domain). Confirm both answers match the panel. Check that the Track.js script loads on a tracked page and that your customer portal opens over HTTPS if you use it.
A tracking migration alone does not move your storefront. Leave website DNS unchanged unless you also intend to launch a RevCent Site on that domain.
Delete a Tracking Domain
To disconnect only a storefront, use Remove tracking domain on Site Details. To delete the Tracking Domain itself, first detach any bound Site and verify the disconnection. Then use the delete action for that domain in the Tracking domains list. Deletion is permanent and affects the services using the domain. The deletion acknowledgement means infrastructure cleanup was queued; cleanup can continue after acceptance.
Provide RevCent the Visitor ID
For non-WordPress checkouts, send the visitor and entry IDs as sale metadata when calling CreateSale. The tracking service sets Secure, HttpOnly cookies scoped to the registrable root domain. For example, the browser can send them in an HTTPS request to checkout.example.com for tracking configured on example.com. Browser JavaScript cannot read them through document.cookie, and a checkout on an unrelated domain does not receive them.
Read the cookies on the checkout server from the incoming request. For example, in Express with cookie-parsing middleware, append the two IDs that are present to the sale body you are preparing:
for (const name of ["revcent_track_id", "revcent_entry_id"]) {
const value = req.cookies[name];
if (typeof value === "string" && value.length > 0) {
(sale.metadata ??= []).push({ name, value });
}
}The resulting fragment of the public POST /v2/sales request body looks like this (example values):
{
"metadata": [
{ "name": "revcent_track_id", "value": "example-visitor-id" },
{ "name": "revcent_entry_id", "value": "example-entry-id" }
]
}Send only these attribution IDs. Do not forward the encrypted tracking cookie or the full Cookie header as metadata.
WordPress Plugin DNS Setting
For RevCent users who are using WooCommerce and the RevCent payments plugin, it is important to enable DNS tracking in the RevCent Payment plugin settings. This ensures that the tracking code for your WordPress site is the correct code for DNS enabled tracking domains.
Important: Only follow these instructions after you have successfully set up DNS for the tracking domain that is the same domain as the WordPress site.
Step 1: Plugins
![]()
- Login to your WordPress site that is the same domain as the tracking domain you have DNS successfully set up for.
- Go to your WordPress plugins page.
- Find the RevCent payment plugin. If you need to update the plugin, do so now.
- Make sure the RevCent Payments plugin version is at least 1.6.0.
- Click “Settings” for RevCent Payments.
Step 2: RevCent Payments
![]()
- After clicking settings on the plugins page, you will be forwarded to the WooCommerce payments page.
- Find RevCent Payments and click the Manage button.
Step 3: Enable DNS Tracking
![]()
- After clicking the manage button on the WooCommerce payments page for RevCent Payments, you will see the plugins’ settings.
- Find the DNS Tracking setting.
- Enable DNS tracking by clicking the checkbox.
- Click Save changes.