A
A
Alexander Osadchy2021-07-03 12:54:37
JavaScript
Alexander Osadchy, 2021-07-03 12:54:37

How to update google ads on click?

Hello!

So, I saw an interesting thing on the site of people - the post is divided into pages, and when you scroll through the pages (every third click) - the block with advertising from google is updated.

60e03353a9148147474866.jpeg

I tried to unearth from these guys (example site) how they did it - and they everything leads to a data.php file

https://www.hadviser.com/wp-content/themes/hairadviser/metrics/js/photo-metrics-v.2.0.js

And from this script the data.php

file twitches. In general, I could not pull off the script ...

Maybe someone knows how to organize a banner update button?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Osadchiy, 2021-07-03
@DELUX

UPD: I found a solution.
Suddenly it will come in handy for someone - here is the script, when called, the advertisement is updated:

$(".adsbygoogle").each(function(i,e){$(e).html($(e).html())});

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question