English
Test the Client-side Script
This page explains how to check your client-side integration with our debug mode: you can test each step yourself, without placing an order, and without your tests being counted as sales.
Using server-side tracking? Its tests are described in the server-side installation guide.
While debug mode is on
Every sale sent from your browser is a test sale: it is recorded by Click2Buy, but never counted in the brands' statistics. This also applies to real orders placed in your browser while debug mode is on.
Turn on debug mode
1
Open your website and accept cookies
Use any page of your website. Our script is only loaded after consent: accept the cookies first, otherwise debug mode cannot start.
2
Add ?c2b_debug=1 to the URL
For example https://www.your-site.com/?c2b_debug=1 (or &c2b_debug=1 if the URL already has parameters). The parameter is then removed from the address bar.
3
The Click2Buy debug panel appears
It shows up in the bottom right corner of the page, and stays on every page of your website for 1 hour, including the checkout pages. It has four tabs, and stays on the tab you picked from one page to the next. The arrow button moves it to another corner, the – button minimizes it.

To turn debug mode off, click Disable in the panel, or open any page with ?c2b_debug=0. It also turns off by itself after 1 hour.
Check your integration
Follow the tabs of the panel from left to right: Config, Confirmation page and Test sale. The Journal tab is used in Check with a real order.
1. The script is installed
The Config tab shows your Retailer Key (Retailer line). If the panel does not appear at all, see Troubleshooting.
It also shows whether Click2Buy has enabled first-party tracking for your website (tracking_param_active and first_party_cookie_active).
2. Your confirmation page is recognised
This step only matters if Click2Buy has configured a validation URL for your website, so that the script detects your order confirmation page by itself. Otherwise, the sale is declared by the C2B.validationProcess(...) call of step 2 of the implementation, checked in Check with a real order.
In the Confirmation page tab:
- This page tells whether the current page is recognised as a confirmation page.
- Paste the URL of one of your order confirmation pages in the field and click Test: for each validation URL, the panel shows whether it matches, and why not. You do not need to reach the confirmation page for this.
On a page recognised as a confirmation page, the panel opens directly on this tab.

3. The Click2Buy click is stored
A sale is only sent when the user came from Click2Buy, so a test sale also needs a Click2Buy click. The Attribution part of the Test sale tab shows the click stored in your browser, and offers two ways to get one:
- Arrive from a real Click2Buy link (recommended): on a brand's website, open the Click2Buy widget on a product and select your website. With debug mode on, the panel then shows
cid <id>under First party (or the content of the cookie under Third party, if first-party tracking is not enabled yet for your website). This also checks that thec2bmparameter survives your redirects and that the script is loaded on the landing page. - Simulate a click from the panel:
- Simulate a first party click: available once Click2Buy has enabled first-party tracking for your website.
- Simulate a third party click: available for every website, in Chrome only (other browsers block third-party cookies).
The Remove buttons delete the simulated clicks from your browser.
4. Send a test sale
Below, in the Order part of the same tab, adjust the amount, currency and product if you want, then click Send test sale. The panel shows the request sent to Click2Buy and its answer.
Test sale sent (validation_test) means the whole chain works: the script, the stored click and the connection to Click2Buy.

The Send test sale button is greyed out until a Click2Buy click is found (step 3).
Check with a real order
The test sale of the panel uses its own form: it does not check the data your confirmation page sends. To check it, place a real order with debug mode on (once is enough). The sale is recorded as a test sale.
On the order confirmation page, open the Journal tab of the panel (while another tab is open, it shows the number of new lines). It shows:
- a
conversionline with the trigger (explicitfor aC2B.validationProcess(...)call,gtm_templatefor our Google Tag Manager template,url_matchfor a validation URL) and the order data received from your page: check the amount, currency and products; - a
requestline, then aresponseline with status200.

conversion), the request sent to Click2Buy, then its responseYou can then cancel the order in your back office.
Troubleshooting
| What you see | Likely cause | What to do |
|---|---|---|
No panel with ?c2b_debug=1 | The script is not loaded on this page | Check that the script is loaded on every page, after the user's consent, and that cookies are accepted. If your website uses a CSP, allow rs.clic2buy.com (Content Security Policy) |
| The panel opens, then disappears when you reload or change page | Your CMP deletes the cookies that are not declared in its cookie list, including _c2b_debug | Declare _c2b_* in your CMP (Cookies). Otherwise _c2b_attr is deleted too, and sales are not attributed |
The c2bm parameter (or the name configured for your website) is missing from the URL of the landing page | Your website removes URL parameters when redirecting | Keep query parameters during redirects |
| No First party click after arriving from a Click2Buy link | The script is not loaded on the landing page, or loaded too late after consent | Load the script on every page, right after consent, including on the landing page |
| Simulate a first party click is greyed out | First-party tracking is not enabled yet for your website | Use Simulate a third party click, or ask your Click2Buy contact |
| The simulated third party click says the browser blocks third-party cookies | Safari, Firefox and private browsing block them | Use Chrome, in a normal window |
| Your confirmation URL does not match | The validation URL configured by Click2Buy does not match your URLs | Send the URL and the panel message to your Click2Buy contact |
No conversion line in the Journal on the confirmation page | Step 2 of the implementation is missing, or your purchase tag did not fire | Check step 2 or your Google Tag Manager purchase tag |
| A response in red, or an error in the browser console | The request is blocked, often by a CSP | Allow t.clic2buy.com and analytics.clic2buy.com (Content Security Policy) |
Cookies set by debug mode
Debug mode only sets cookies in the browser of the person who turns it on, never for your visitors:
| Cookie | Domain | Set when | Duration |
|---|---|---|---|
_c2b_debug | Your website | Debug mode is turned on | 1 hour |
_c2b_debug_pos | Your website | The panel is moved to another corner | 1 hour |
_c2b_debug_tab | Your website | Another tab of the panel is opened | 1 hour |
_c2b_attr | Your website | Simulate a first party click | 30 days |
validation-<retailer key> | clic2buy.com | Simulate a third party click | 1 hour |
_c2b_debug, _c2b_debug_pos and _c2b_debug_tab are removed when debug mode is turned off. The simulated clicks are removed with the Remove buttons of the panel.
If your CMP deletes undeclared cookies, these cookies are covered by the _c2b_* pattern to declare for the script (Cookies). The debug cookies can go in the strictly necessary or functional category.
Need help?
If something still does not work, contact your Click2Buy Retailer Account Manager, with a screenshot of the debug panel and the URL of the page: it shows us what happened at each step.