Online Advetisement/Banner Management System - banner

I am developing site for online advertisements where sellers and buyers can come and sell/buy advertisements.
Just need to develop detailed statistics like click counts, from which page clicks are coming (one advertisement can be placed on many pages), from which position (top, right, left ...) click are coming (one advertisement can be placed in different position on single page) etc. I seen that most of the advertisement on popular websites has following format:
http://ads.stackoverflow.com/a.aspx?Task=Click&ZoneID=3&CampaignID=838&AdvertiserID=50&BannerID=1335&SiteID=1&RandomNumber=1463177307&Keywords=c%23%2c.net%2ccollections%2cdictionary%2chashtable
It has many parameters like ZoneID, CampaignID, AdvertiserID, BannerID, SiteID, RandomNumber, adid, adcrid, obid, obtid and way. I can use one advertisement (adid) in multiple pages. But can't figure out the way to distinguish between from which pages clicks are coming. How can I use such parameters to generate statistics which tell me the page from which clicks are coming?

I'm curious as to why you would want to reinvent this wheel?

Related

Difficulty finding out how dynamic ajax content is loaded

So I want to crawl information about the following 2 products:
1. http://www.dollargeneral.com/product/index.jsp?productId=86154836
2. http://www.dollargeneral.com/product/index.jsp?productId=58607576
Product No.2 offers "save 5% on all order with Auto delivery"
Product No.1 doesn't
When I crawl this page, the "div" about the offer part doesn't show up, so I think this information is loaded by ajax.
Now my questions is: after using chrome dev tool to check the "Network" using XHR filter, both URLs only send 1 request that contains seemingly useless information.
So where is the offer information coming from? Thank you!
These are two different products. One simply has the offer attached to it while the other does not. Some products include the offer and others don't.

detect if site is being accessed via iframe? embed widget with shopping cart

I have a shopping cart I want to embed in a widget/iframe on other users sites, I see three ways of doing this each with drawbacks. Here are options from estimated most to least work.
Recreate interactive shopping cart UI in javascript widget then pass values to server script with AJAX, variables are passed to the main site, when user clicks "checkout" the user is then redirected to main shopping cart site with variables populated from what the entered in the widget.
pros: complete experience
cons: most work to complete creating UI and AJAX request.
Somehow detect if user is coming to shopping cart via iframe, if this is the case have alternate code that opens new window when user clicks "checkout" redirecting user to secure page and getting variables from cart via AJAX to populate final checkout.
pros: mid amount of work, must do AJAX request to get variables from shopping cart to populate final checkout
cons: can we easily detect if site is being accessed from a user within an iframe on another site?
complete entire checkout process inside iframe/widget.
pros: least ammount of work, just embed cart in iframe
cons: will not show https in browser user may be reluctant to purchase
What is the best option?
If you could provide a bit more information, maybe I could offer you an even better option. For starters, what have you built this application with (languages/framework)? Also, would you say your application's functionality is similar to Shopify's in that you allow users to host e-commerce sites through your service? If not, tell us a bit more about your application.
Here's a quick response to the options you provided.
option 1: the only real option as I see it. Whether you're embedding the shopping cart in specifically an iframe or rendering it onto the user's page as part of a template, you should be navigating the customer away to your main site to complete the checkout process. Or at least give them a lot of screen real-estate to work with (a sizable modal for example).
option 2: is messy. You can tell if a request is coming from a remote form (like an iframe) by appending url parameters. But taking the approach you're suggesting with this doesn't make too much sense.
option 3: too heavy unless you take a modal-approach like what I mentioned in response to option 1.
That being said, if you are building an application like Shopify, you should be able to build a template for each user's website that has a section dedicated to displaying a shopping cart pertaining to the current customer's session. No iframes or widgets necessary with this approach. But again, it all depends on the use cases of your application.
If your only concern with Option 2 is detecting if your content is being loaded within an iframe, you can do that with JavaScript by using "top.frames.length" or "top === self."
For example, you could show or hide different conditional form content, or a different submit button, using the following:
if (top.frames.length == 0) {
// Show content if not embedded in an iframe.
document.getElementById('embedded-content').style.display = "none";
document.getElementById('unembedded-content').style.display = "block";
}
else {
// Show content if embedded in an iframe.
document.getElementById('embedded-content').style.display = "block";
document.getElementById('unembedded-content').style.display = "none";
}
As you've stated, the first option is the best in terms of user experience and the most likely to achieve the highest possible conversions. How much better the conversion is compared to the next best solution cannot be objectively measured, as it involves recurring customers, your own brand name, the kind of products, etc. Since the conversion rates will directly affect you (and your company), it's wise to make an estimate first to see if your efforts spent will be worth it in the short and long term.
The second option is the sweet middle ground; you still get brand recognition and customers will have some security reassurance (via address bar); (i)frame detection is easily done by a simple JavaScript comparison: top === window. However, you're losing the continuity and hence likely lose some conversion. If this risk is manageable, I'd go for this option in the short term.
Not being able to see the security certificate directly via the green lock makes the third option the least desirable. However, not all is lost; by clever use of imagery you can still gain some trust with your end-user, as outlined in this image, which is part of a great article from Smashing Magazine.
Your decision should be based on:
what can be done in the short term
what should be done in the long term
how important is secure visual cues to my potential customer
time / money spent on either solution versus revenues (break-even analysis)

Adsense revenue depending on use of Ajax

I noticed that a website like imgur.com displays ads on each page of the website.
This means each time you press "next" to view another funny picture, AdSense refreshes.
But a website where you can scroll to view more pages(such as 9gag.com),
Ajax handles loading of more funny pictures so it's illegal to refresh Adsense when a user scrolls for more funny pictures.
Does this means 50 users staying on 9gag.com for 3 hours scrolling and viewing 300 funny pictures would help 9gag.com generate revenue equal to ONE imgur.com user that views only 1 picture?
Does this also mean I should stay away from Ajax if I wanted revenue?
This was very confusing for me, please help me understand AdSense better.
Thank you!
WEll the problem with fully scripted ajax loaded content is that Adsense cannot read it. Therefore it has a hard time displaying relevant ads, because most advertisers have chosen to target the visitor location and the keywords on the pages. So if Adsense has no text, then most of the time it's not going to be able to serve an ad.
But I looked at 9gag.com and they are using what I think is the ajax version of Adsense, or perhaps the premium version of Adsense which allows for all sorts of things and is quite different from the core Adsense program in many ways that nobody seems to know about, and few are invited. All the big publishers I suppose.
Anyway, if you do end up clicking on one of the posts on 9gag.com you'll see other ads. Granted that the way that imgr.com has things set up should encourage more content viewing per visitor and thus also some more ad viewing, but I wouldn't say that one necessarily has more traffic overall than the other. There are too many unknown factors to determine that. Not something you can do just with looking at a site. That is where having good analytics of your traffic and visitor behavior comes in.

Event tracking and virtual pageviews are not tracked in Google Analytics

I'm trying to track how visitors interact with the price calculator that i placed on my website.
I've tried placing events and virtual pageviews in different places and events (onClick, onMouseDown, onMouseOver, in href attribute, onChange in the input tag). No matter what i do - no events or virtual pageviews are tracked, though i can see the __utm.gif requests for everything i want to track in FireBug, but nothing in GA reports.
Here's the calculator i'm tracking (it's in Russian, the event i'm trying to track is the big orange button).
Firstly, I do see a _trackPageview() call passing "/virtual/trees/calculate" on various onmouseover,onchange, and onclicks, and at face value I see no reason you shouldn't be seeing "/virtual/trees/calculate" show up in your pages report, but google officially states that it takes up to 24 hours to see data.
Second, I do not see any event tracking on your page. I do not see any code for it, nor do I see any GA calls showing it from random interactions on your page. If it is there, you will need to give detail about where it is and how it is coded.
Third, do you see the page view for the actual page? Which account/profile are you looking at? Because when I first load the page, I see two separate hits to GA happening, the first to account/profile # "UA-25026876-1" (which is from your on-page code) and the second to account/profile # "UA-20200270-1" (which is happening from a counter.js script include), and the second one is where your virtual page views are going to.

How do you prevent gaming of page views?

Say I have a site with pages. Pages are ranked based on the number of times they have been viewed. It is good for a page to be highly ranked because it will make it show up higher in my search results. Hence, the author of a page may try to game the system to increase that particular page's views.
So how do you prevent that while still keeping a quasi-accurate count?
I have come up with the following "scheme":
A user can only affect the page view once per session. This is what I would normally expect. If a user returns to the site later and views the page again, it should count as another page view.
The problem is that this makes the page view increment vulnerable to a script that clears its cookies before each request. The easiest solution to this problem would be to save the ip-address and only allow the same ip-address to increment page count once. This however has several major drawbacks; First of all, this would potentially take up a lot of storage, and second of all would prevent users on big LANs from incrementing page count. Lastly, a user cannot revisit a page and increment the page view more than once from the same ip. I can live with that, but would rather live without it.
The best method I can come up with off the top of my head would be to save the last X ip-addresses, and not let anyone from these ip-addresses affect the page view count. This would effectively stop any (simple) script from raising the page view count. Furthermore it would probably be a good idea to add a delay to the display of actual view count (basically keeping two counts and a datetime field for when the "display" count was last updated with the "actual" count, something I believe is done on the SE sites).
This is not a perfect solution, so I would be happy to hear your suggestions and/or comments.
Don't prevent: monitor and handle.
I would use a very different approach. Let the page views stay the same, but have reporting in place to looks for view-gaming. If a page gets gamed, you can find out who is responsible, give them a warning and a page-view penalty. If it continues, ban them.
I think that you should consider the reported characteristics of the browser as well. Browser fingerprinting has been done before and is well publicized. You can then figure out some pretty advanced heuristics on determining whether the same user is trying to game you. But don't publicize that you're using browser fingerprinting of course. Also, it won't stop incognito mode, but I'm just trying to give you one more avenue of thought to follow, in addition to your current IP oriented strategies.

Resources