JavaScript-HTML Integration

Add the content to your website using standard JavaScript & HTML

Team avatar
Written by Team
Updated over a week ago

Each Geo Content service you create will come with it's own JavaScript code and each rule will have it's own smart HTML tag.

The provided JavaScript code needs to be placed in your website just before the closing body tag </body> or in your website footer.

The smart HTML tags should be 'wrapped' around the respective content to be shown based on the rules you have setup.
โ€‹

<head>
<!-- Your website head -->
</head>

<body>

<!-- Other content -->

<!-- Start Geo Content HTML Tag For Rule 1 -->
<div class='geotargetlygeocontent1556689537225_content_1' style='display:none;'>
<!-- Enter content here -->
</div>
<!-- End Geo Content HTML Tag For Rule 1 -->


<!-- Start Geo Content HTML Tag For Rule 2 -->
<div class='geotargetlygeocontent1556689537225_content_2' style='display:none;'>
<!-- Enter content here -->
</div>
<!-- End Geo Content HTML Tag For Rule 2 -->


<!-- Start Geo Content HTML Tag For Rule 3 -->
<div class='geotargetlygeocontent1556689537225_content_3' style='display:none;'>
<!-- Enter content here -->
</div>
<!-- End Geo Content HTML Tag For Rule 3 -->


<!-- Other content -->

<!-- Start Geo Content JavaScript code -->
<script>
var geotargetlycontent1556689537225 = document.createElement('script');
geotargetlycontent1556689537225.setAttribute('type','text/javascript');
geotargetlycontent1556689537225.async = 1;
geotargetlycontent1556689537225.setAttribute('src', '//geo-targetly.com/geocontent?id=-LdlvJUen_ti5Lr77GzD');
document.getElementsByTagName('head')[0].appendChild(geotargetlycontent1556689537225);
</script>
<!-- End Geo Content JavaScript code -->

</body>
Did this answer your question?