Welcome to Idea R | Branding - Web Agency - Digital Strategies
Switch to the mobile layout

      Idea R - Do others know who you are? Design your corporate identity
  • HomeHome
  • About UsAbout Us
  • ContactsContacts


Take a software geek from the 80s, add a new generation graphic designer and dilute with a longtime marketing strategist. Shake vigorously and you'll get the Idea R's blog.

Change language... italiano
Go to the blog summaryGo to the blog summary

You may be interested in

Lazy loading and the SEO problem, solved!

Lazy loading and the SEO problem, solved!

The best SEO solution to index your dynamically loaded contents, no more compromises!

ASP.NET 301 permanent redirects: the best solution

Have you changed your domain and don't want to loose your SEO page rankings?

Last published

Metalworking industry: how to multiply customers using only the website and zero advertising budget

Metalworking industry: how to multiply customers using only the website and zero advertising budget

Find out how to design a website for the metalworking industry, that will be a magnet for customers and able to triple your leads.

A simple but effective SEO strategy: the middleman

Get excellent results in a short time using this SEO trick. Lern how to quickly apply the middleman technique and have many new web pages indexed.

Most popular

Case study: TAV Engineering, branding for B2B services

Case study: TAV Engineering, branding for B2B services

How to create a brand that keeps distance from the cold and aseptic image of the metal industry, focusing instead on the human aspect.

Case study: IED Open Day, building a font by hand... literally

These days graphic design is mainly the result of software tools. Here's a case study where a brand is designed with glue and scissors

Editor's pick

Case study: branding and marketing for a magician

Case study: branding and marketing for a magician

Singular case study in the world of illusionism. See how we have created a brand and a web marketing campaign with exceptional results.
Mental marketing secret #1: the fake compromise

Mental marketing secret #1: the fake compromise

Can mentalism influence marketing? As a marketing professional and a long term magician, I will reveal you some tricks.

Stay informed on digital strategies

Take a look at the last published articles
RSS feed

Internal campaigns with Google Analytics and .NET AdRotator

Published on 7/17/2012
Categories: Web Analytics
Internal campaigns with Google Analytics and .NET AdRotator

An internal campaign banner is one that points to the same site it is contained in, for example you may advertise for one of your products while the user is looking at another one.
For banners hosted in external sites the best way to collect statistics is to use UTM (Urchen Tracking Module) query parameters: Google Analytics can automatically collect and group this type of data.
On the other side, the UTM approach is not good for internal campaigns, because when mixed with external ones, it compromises the analysis: try to imagine what happens if a user clicks on an external banner, then in an internal one and finally she makes a conversion. Which is the cause and which is the effect?

For internal campaigns the best way to collect data is the event tracking feature of Google Analytics. Event tracking was created to analyze many types of user actions, also the ones that are not directly related to a page visit, for example downloading a file, listening an MP3, showing a video, etc.

To enable event tracking when a user clicks on our banner we add the following code the the link:

onclick="gaq.push(['_trackEvent', 'MyCampaignName', 'MyBannerName', this.href]);"

When using ASP.NET AdRotator control, all advertising data is contained in a XML file, but apparently there's no way to assign a JavaScript event to a link. We can do this in two ways, by jQuery on the client side or by C# on the server side.
In this case I prefer the server side because I'm rotating the advertisements (you can use jQuery if your AdRotator contains only one advertisement) and I can add more information to the statistics while rendering the control. To accomplish this we'll use the AdRotator custom properties, that is we'll add a custom field named CampaignName to the XML file.

<?xml version="1.0" encoding="utf-8" ?>
        <CampaignName>My first campaign</CampaignName>
        <CampaignName>My second campaign</CampaignName>

To conclude will generate the JavaScript when the control fires the AdCreated event:

 private void m_MyAdRotator_AdCreated(object sender, AdCreatedEventArgs e)
        String.Format("_gaq.push(['_trackEvent', '{0}', 'MyBanner', this.href]);",

That's all, now in your Google Analytics profile you can analyze internal and external campaigns without messing all your data.

Has this article been useful to you?

Help us to spread it over the network using StumbleUpon.
Just press the button here below!

You are the reader number 7,664.


Creative Commons License

Photographies, videos, graphics and texts by Idea R are licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.

Previous article

Previous article

How to include CSS files programmatically in ASP.NET

Next article

TechEd Europe 2012: Windows 8 report from Amsterdam

Next article
  • Visual Communication, Art DirectionVisual Communication, Art Direction
  • Apps, Cloud, Mobile, Software DesignApps, Cloud, Mobile, Software Design
  • Digital StrategiesDigital Strategies
  • BlogBlog
Touching finger
RSS feed

Scroll to top