List of Issues:
Not Loading urls like facebook.com with type json, google analytics urls with type javascript, gif and xhr.
For example in Google Analytics out of 5 fired 4 urls. 1 urls is not firing. Please check our code and let us know how to fire all urls at a time in conversion.async.js
WebClient webClient = new WebClient(BrowserVersion.FIREFOX_52);
webClient.getCookieManager().clearCookies();
webClient.getCache().clear();
webClient.setAjaxController(new NicelyResynchronizingAjaxController());
webClient.setCssErrorHandler(new SilentCssErrorHandler());
webClient.getOptions().setTimeout(120000);
// to wait for AJAX
webClient.waitForBackgroundJavaScript(60000);
webClient.getOptions().setRedirectEnabled(true);
webClient.getOptions().setJavaScriptEnabled(true);
webClient.getOptions().setPrintContentOnFailingStatusCode(false);
webClient.getOptions().setThrowExceptionOnFailingStatusCode(false);
webClient.getOptions().setThrowExceptionOnScriptError(false);
webClient.getOptions().setUseInsecureSSL(true);
webClient.getOptions().setDoNotTrackEnabled(false);
new WebConnectionWrapper(webClient) {
int conversionUrlCount = 0;
@Override
public WebResponse getResponse(WebRequest request) throws IOException {
System.out.println(request.getUrl());
WebResponse response = super.getResponse(request);
System.out.println(response.getStatusCode());
if (response.getStatusCode() < 400) {
resourceUrls.add(request.getUrl());
}
return response;
}
};
String url = "",
HtmlPage page = webClient.getPage(url);
// to forcibly load the link
HtmlLink link = page.getFirstByXPath("//link");
link.getWebResponse(true);
// to forcibly load the image
try {
HtmlImage image = page.getFirstByXPath("//img");
image.getImageReader();
} catch (IOException e) {
//don't need to crash at this point,
//just let the user know that a wrong file has been passed.
}
Can you please provide a sample url to make this reproducible (and a list of requests you are missing).
You are sure real browsers doing all the requrests?
List of Request missing:
https://googleads.g.doubleclick.net/pagead/viewthroughconversion/983027267/?random=1532424560241&cv=9&fst=1532424560241&num=1&guid=ON&resp=GooglemKTybQhCsO&u_h=1080&u_w=1920&u_ah=1056&u_aw=1877&u_cd=24&u_his=2&u_tz=330&u_java=false&u_nplug=3&u_nmime=4&sendb=1&frm=0&url=https%3A%2F%2Fwww.crowndodgechryslerjeep.com%2F&tiba=Crown%20Dodge%20Chrysler%20Jeep%20RAM%20%7C%20In%20Ventura%2C%20CA&async=1&rfmt=3&fmt=4
https://www.google.com/ads/user-lists/983027267/?random=1532424560241&cv=9&fst=1532422800000&num=1&guid=ON&u_h=1080&u_w=1920&u_ah=1056&u_aw=1877&u_cd=24&u_his=2&u_tz=330&u_java=false&u_nplug=3&u_nmime=4&sendb=1&frm=0&url=https%3A%2F%2Fwww.crowndodgechryslerjeep.com%2F&tiba=Crown%20Dodge%20Chrysler%20Jeep%20RAM%20%7C%20In%20Ventura%2C%20CA&async=1&fmt=3&cdct=2&is_vtc=1&random=2143468188&resp=GooglemKTybQhCsO&rmt_tld=0&ipr=y
https://www.facebook.com/tr/?id=1602845983312973&ev=PageView&dl=https%3A%2F%2Fwww.crowndodgechryslerjeep.com%2F&rl=&if=false&ts=1532424558578&sw=1920&sh=1080&v=2.8.23&r=stable&ec=0&o=28&it=1532424557217
https://www.facebook.com/tr/?id=1602845983312973&ev=ViewContent&dl=https%3A%2F%2Fwww.crowndodgechryslerjeep.com%2F&rl=&if=false&ts=1532424558579&cd[content_ids]=3510&cd[content_type]=vehicle&sw=1920&sh=1080&v=2.8.23&r=stable&ec=1&o=28&it=1532424557217
Diff:
Diff:
Diff:
Sorry, for asking again. I need a way to reproduce this, any help to understand the problem is welcome.
And finally please place your
webClient.waitForBackgroundJavaScript(60000);call after the get class (this is not an option).
Thanks for replyimg. I will try to explain my problem clearly,
While looking into the browser developer tools window, I see 5 tags triggerd and below attached urls,
https://googleads.g.doubleclick.net/pagead/viewthroughconversion/955637372/?random=1532497236673&cv=9&fst=1532497236673&num=1&label=GDN%20955637372%20Everywhere&guid=ON&resp=GooglemKTybQhCsO&u_h=1080&u_w=1920&u_ah=1056&u_aw=1877&u_cd=24&u_his=2&u_tz=330&u_java=false&u_nplug=3&u_nmime=4>m=G7g&sendb=1&frm=0&url=https%3A%2F%2Fwww.crowndodgechryslerjeep.com%2F&tiba=Crown%20Dodge%20Chrysler%20Jeep%20RAM%20%7C%20In%20Ventura%2C%20CA&async=1&rfmt=3&fmt=4
https://googleads.g.doubleclick.net/pagead/viewthroughconversion/947772543/?random=1532497234720&cv=9&fst=1532497234720&num=1&guid=ON&resp=GooglemKTybQhCsO&eid=376635471&u_h=1080&u_w=1920&u_ah=1056&u_aw=1877&u_cd=24&u_his=2&u_tz=330&u_java=false&u_nplug=3&u_nmime=4&data=pageType%3Dhome&sendb=1&frm=0&url=https%3A%2F%2Fwww.crowndodgechryslerjeep.com%2F&tiba=Crown%20Dodge%20Chrysler%20Jeep%20RAM%20%7C%20In%20Ventura%2C%20CA&async=1&rfmt=3&fmt=4
https://googleads.g.doubleclick.net/pagead/viewthroughconversion/880290305/?random=1532497235082&cv=9&fst=1532497235082&num=1&label=JOG6CKb8sGcQgdTgowM&guid=ON&resp=GooglemKTybQhCsO&u_h=1080&u_w=1920&u_ah=1056&u_aw=1877&u_cd=24&u_his=2&u_tz=330&u_java=false&u_nplug=3&u_nmime=4>m=G7g&sendb=1&frm=0&url=https%3A%2F%2Fwww.crowndodgechryslerjeep.com%2F&tiba=Crown%20Dodge%20Chrysler%20Jeep%20RAM%20%7C%20In%20Ventura%2C%20CA&async=1&rfmt=3&fmt=4
https://googleads.g.doubleclick.net/pagead/viewthroughconversion/836226541/?random=1532497235106&cv=9&fst=1532497235106&num=1&guid=ON&resp=GooglemKTybQhCsO&u_h=1080&u_w=1920&u_ah=1056&u_aw=1877&u_cd=24&u_his=2&u_tz=330&u_java=false&u_nplug=3&u_nmime=4>m=G7g&sendb=1&frm=0&url=https%3A%2F%2Fwww.crowndodgechryslerjeep.com%2F&tiba=Crown%20Dodge%20Chrysler%20Jeep%20RAM%20%7C%20In%20Ventura%2C%20CA&async=1&rfmt=3&fmt=4
https://googleads.g.doubleclick.net/pagead/viewthroughconversion/983027267/?random=1532497237535&cv=9&fst=1532497237535&num=1&guid=ON&resp=GooglemKTybQhCsO&u_h=1080&u_w=1920&u_ah=1056&u_aw=1877&u_cd=24&u_his=2&u_tz=330&u_java=false&u_nplug=3&u_nmime=4&sendb=1&frm=0&url=https%3A%2F%2Fwww.crowndodgechryslerjeep.com%2F&tiba=Crown%20Dodge%20Chrysler%20Jeep%20RAM%20%7C%20In%20Ventura%2C%20CA&async=1&rfmt=3&fmt=4 (Missing trigger in HTMLUNIT)
While executing the same webpage in the HTMLUNIT, Isee only 4 tags triggered and below attached urls,
https://googleads.g.doubleclick.net/pagead/viewthroughconversion/955637372/?random=1532497236673&cv=9&fst=1532497236673&num=1&label=GDN%20955637372%20Everywhere&guid=ON&resp=GooglemKTybQhCsO&u_h=1080&u_w=1920&u_ah=1056&u_aw=1877&u_cd=24&u_his=2&u_tz=330&u_java=false&u_nplug=3&u_nmime=4>m=G7g&sendb=1&frm=0&url=https%3A%2F%2Fwww.crowndodgechryslerjeep.com%2F&tiba=Crown%20Dodge%20Chrysler%20Jeep%20RAM%20%7C%20In%20Ventura%2C%20CA&async=1&rfmt=3&fmt=4
https://googleads.g.doubleclick.net/pagead/viewthroughconversion/947772543/?random=1532497234720&cv=9&fst=1532497234720&num=1&guid=ON&resp=GooglemKTybQhCsO&eid=376635471&u_h=1080&u_w=1920&u_ah=1056&u_aw=1877&u_cd=24&u_his=2&u_tz=330&u_java=false&u_nplug=3&u_nmime=4&data=pageType%3Dhome&sendb=1&frm=0&url=https%3A%2F%2Fwww.crowndodgechryslerjeep.com%2F&tiba=Crown%20Dodge%20Chrysler%20Jeep%20RAM%20%7C%20In%20Ventura%2C%20CA&async=1&rfmt=3&fmt=4
https://googleads.g.doubleclick.net/pagead/viewthroughconversion/880290305/?random=1532497235082&cv=9&fst=1532497235082&num=1&label=JOG6CKb8sGcQgdTgowM&guid=ON&resp=GooglemKTybQhCsO&u_h=1080&u_w=1920&u_ah=1056&u_aw=1877&u_cd=24&u_his=2&u_tz=330&u_java=false&u_nplug=3&u_nmime=4>m=G7g&sendb=1&frm=0&url=https%3A%2F%2Fwww.crowndodgechryslerjeep.com%2F&tiba=Crown%20Dodge%20Chrysler%20Jeep%20RAM%20%7C%20In%20Ventura%2C%20CA&async=1&rfmt=3&fmt=4
https://googleads.g.doubleclick.net/pagead/viewthroughconversion/836226541/?random=1532497235106&cv=9&fst=1532497235106&num=1&guid=ON&resp=GooglemKTybQhCsO&u_h=1080&u_w=1920&u_ah=1056&u_aw=1877&u_cd=24&u_his=2&u_tz=330&u_java=false&u_nplug=3&u_nmime=4>m=G7g&sendb=1&frm=0&url=https%3A%2F%2Fwww.crowndodgechryslerjeep.com%2F&tiba=Crown%20Dodge%20Chrysler%20Jeep%20RAM%20%7C%20In%20Ventura%2C%20CA&async=1&rfmt=3&fmt=4
This is actually Adwords Remarketing tags and this is a script tag place inside a GTM container
URL executed: https://www.crownchryslerdodgejeep.com/