{"section":"tutorials","requestedLocale":"en","requestedSlug":"configuring-clearsale-global-anti-fraud-solution","locale":"en","slug":"configuring-clearsale-global-anti-fraud-solution","path":"docs/en/tutorials/payments/payment-settings/configuring-clearsale-global-anti-fraud-solution.md","branch":"main","content":"ClearSale Global is an anti-fraud solution, available __exclusively for the international market__. Through customer behavior analysis, the solution identifies vulnerabilities and prevents possible fraud in the transactions of your store.\n\n> ℹ️ If you are in Brazil and would like to use ClearSale, VTEX offers integration with ClearSale V3, exclusive for Brazilian customers. Please refer to the tutorial [Configuring ClearSale V3 anti-fraud solution](/en/tutorial/configurar-antifraude-clearsale-v3--2pPORygesIqQOa6cIG6agg?&utm_source=autocomplete) to configure it.\n\nTo configure ClearSale Global, you will need to:\n\n1. [Configure ClearSale Global anti-fraud solution](#configuring-clearsale-global-anti-fraud-solution)\n2. [Configure Google Tag Manager](#configuring-google-tag-manager)\n3. [Associate ClearSale Global with a payment condition](#associating-clearsales-global-solution-with-a-payment-condition)\n\n## Configuring ClearSale Global anti-fraud solution\n\n1. Access the VTEX __Admin__.\n2. Click on __Payments > Settings__.\n3. In __Gateway Affiliations__, click on the green “__+__” button.\n4. In the __Anti-fraud__ section, select __ClearSaleGlobal__.\n5. Complete the fields below with the information sent by ClearSale via email.\n<br /><br />\n<ul>\n  <li>**Application key and Application token.</li>**\n  <li>**Enable Risk Pre-Analysis.** (currently only available for Mexico).</li>\n<li>**API Key.</li>**\n<li>**AnalysisLocation.</li>**\n </ul>\n  </li>\n</ul>\n6. Once you finish completing the fields, click on __Save.__\n\n## Configuring Google Tag Manager\n\n1. [Click here](http://tagmanager.google.com) and log into Google Tag Manager.\n2. In the home dashboard, click on __Tag__, and then click on __New__.\n3. Choose the product __Personalized HTML Tag__.\n4. In the __HTML__ field, paste the code below, replacing `your_clientid` with your identifier sent to you by ClearSale (between single quotes).  \n```\n<script>\n    var deviceFingerprintIdCSV4 = 10000000 + Math.floor(Math.random() * 99999999);\n    (function (a, b, c, d, e, f, g) {\n    a['CsdpObject'] = e; a[e] = a[e] || function () {\n    (a[e].q = a[e].q || []).push(arguments)\n    }, a[e].l = 1 * new Date(); f = b.createElement(c),\n    g = b.getElementsByTagName(c)[0]; f.async = 1; f.src = d; g.parentNode.insertBefore(f, g)\n    })(window, document, 'script', '//device.clearsale.com.br/p/fp.js', 'csdp');\n    csdp('app', 'your_clientid');\n    csdp('sessionid', deviceFingerprintIdCSV4);\n    window.vtex.deviceFingerprint = deviceFingerprintIdCSV4;\n</script>\n```\n  <ui>5. After entering the code, check the option **Support for document.write**.</ui>\n<br />  \n  <ui>6. In **Trigger In**, select the option **More** AND click on **New**.</ui>\n<br />  \n  <ui>7. Allocate a name to this trigger and choose the event type **Personalized Event**.</ui>\n<br />  \n  <ui>8. In **Trigger In**, define the name of the event as **payment**.</ui>\n<br />  \n  <ui>9. Save the trigger.</ui>\n<br />  \n  <ui>10. Click on the **Create Tag** button, enter a name for this tag and save.</ui>\n<br />  \n  <ui>11. In the top right corner, click on **Publish**.</ui>\n\n![Fingerprint ClearSalve_Screen](https://cdn.statically.io/gh/vtexdocs/help-center-content/refs/heads/main/docs/en/tutorials/payments/payment-settings/configuring-clearsale-global-anti-fraud-solution_1.png)\n\nFor more details about the code entered in Google Tag Manager, we recommend reading [this documentation](https://api.clearsale.com.br/docs/behavior-analytics) from ClearSale.\n\n## Associating ClearSale’s Global solution with a payment condition\n\nClearSale Global will perform anti-fraud analysis of transactions if it is associated with the payment conditions in your store. To do this, please follow the instructions below:\n\n1. Access the VTEX __Admin__.\n2. Access the __Payments__ module.\n3. Click on __Settings__.\n4. In the __Payment conditions__ tab, select an existing condition, or check out the tutorial [Configuring a payment condition](/en/tracks/pagamentos--6GAS7ZzGAm7AGoEAwDbwJG/6bzGxlz4inf8sKmvZ1c7i3?&utm_source=autocomplete) to create a new one.\n5. Make sure the payment condition is __Active__.\n6. After selecting or creating a new condition, enable the option __Use anti-fraud solution__.\n7. Select the option __ClearSale Global__.\n8. Click on __Save__.\n\nAfter these configurations, ClearSale will be ready to be used in your store."}