I am trying to cleanup unnecessary code in a wordpress site. I see, in html source code of the website, there is a javascript. it is adroll script, check below...

<script type="text/javascript">
adroll_adv_id = "4XJPGN2DSVEYBBDED4DKXK";
adroll_pix_id = "SEEYI5KV2BA53OK5YIG7IP";
(function () {
var oldonload = window.onload;
window.onload = function(){
var scr = document.createElement("script");
var host = (("https:" == document.location.protocol) ? "https://s.adroll.com" : "http://a.adroll.com");
scr.setAttribute('async', 'true');
scr.type = "text/javascript";
scr.src = host + "/j/roundtrip.js";
((document.getElementsByTagName('head') || [null])[0] ||

I tried to locate the above code in all possible ways.

checked all the plugins

Deactivated Google Analytics plugin

Checked functions.php

Checked header.php and foother.php

downloaded wntire wordpress from server and then used MX dreamweaver to find adroll in source code.

But location of the javascript is still not found.

  • index.php might also contains some script.
    – Rishabh
    Apr 6, 2017 at 7:03

2 Answers 2


I would download all files via FTP and search in the folder for adroll_adv_id. If there's no result then it's either in the database or obfuscated.

  • exported database in xml and found it.
    – NehaAgra
    Apr 6, 2017 at 16:41

Do you use some template and is there a chance that is includes anywhere in it something that starts with eval or has adroll IDs fields in settings panel? Or maybe you use a free hosting provider that is adding their ads on you site? Can you share the link to the website?

  • i initially suspected code injection. and i checked for eval. but, did not find.
    – NehaAgra
    Apr 6, 2017 at 16:40

Not the answer you're looking for? Browse other questions tagged or ask your own question.