/    Sign up×
Community /Pin to ProfileBookmark

Tracking JS Bannerclicks

Hi,

I have a problem, I need to track JavaScript Codes, that means that our JS Script deliver a banner (img, flash or iframe) and we have to track views and clicks on that banner.
the problem is that we can only user js, php or perl.
the user can only use js, so we have to find a solution to track views and clicks on a banner which is delivered by an javascript snippet.

i didn´t find anything yet, hope you can help me with this problem…

greets
tobias

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@bokehJan 11.2006 — Is it your banner on someone elses website... or... someone elses banner on your website.
Copy linkTweet thisAlerts:
@TobiaskauthorJan 11.2006 — Is it your banner on someone elses website... or... someone elses banner on your website.[/QUOTE]

our banner on someone elses website, the owner of the site just includes our javascript code to their page.
Copy linkTweet thisAlerts:
@bokehJan 11.2006 — On their page they have something like the following:[code=php]<a href="http://yourDomain.com/path/file.php"><img src="http://yourDomain.com/path/banner.gif"></a>[/code]

All you need to do is hook a unique query string to the url here: [I]<a href="http://yourDomain.com/path/file.php"> [/I]and then have php read it if the url is accessed. Example: [I]http://yourDomain.com/path/file.php[color=red]?referer=client1[/color][/I].

Now all you need to do is in php:[code=php]if(isset($_GET['referer'])){
// save details to mysql
}[/code]
×

Success!

Help @Tobiask spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...