# Custom JavaScript
This integration allows you to add additional JavaScript code. This can be used to enable various third-party integrations that are not specifically implemented in DG1 platform.
JavaScript code must not include <script></script>
tags.
# JavaScript code example for Google AdSense
var script = document.createElement('script');
script.type = 'text/javascript';
script.crossorigin = 'anonymous';
script.src = 'https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-19841618616681';
document.getElementsByTagName('head')[0].appendChild(script);
# Add Custom JavaScript to DG1 platform
- Log into your DG1 Admin panel.
- Navigate to Plugins and create a new integration by clicking Add under JavaScript.
- Enter the custom JavaScript code in the Content field and select the output location. This defines where the provided JavaScript will be outputted in the HTML code.
- To save your new integration, click Submit .
Important
Never include code from unknown/untrusted sources as malicious code can create serious problems with security.
Also be mindful that including some third-party providers creates additional data processing activities that must be reflected in your “Privacy policy” and/or “Terms of use”.
If a third party provider uses cookies, you must use the Cookie registry in your DG1 platform (Settings -> Cookies) to register those providers and describe their data usage.
← Custom CSS Sitemaps →