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

      Idea R - Do you have a real web strategy? Persuasion Technologies
  • HomeHome
  • About UsAbout Us
  • ContactsContacts

Blog

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

Change language... italiano

You may be interested in

How to dramatically increase social media LIKEs to your web site

How to dramatically increase social media LIKEs to your web site

Here's a free download that I created some time ago. It's a good tool for increasing engagement, but use with caution.

Internal campaigns with Google Analytics and .NET AdRotator

Do you have banners that point to the same site they are contained in? Be careful on how you setup Google Analytics...

Last published

Milano Design Week 2017, Design Districts

Milano Design Week 2017, Design Districts

Ventura Lambrate and Tortona, here are the best creations that we discovered in the 2 districts of the Fuorisalone Milan Design Week 2017.

How to design a FAKE B2C brand for a real B2B service

Interesting case study where to advertise B2B services we created a fake B2C product in a guerrilla marketing campaign.

Most popular

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!

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.

Editor's pick

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.
newsletter

Stay informed on digital strategies

My reviews on the subject...

Really well written, by one of the Google Analytics creators, Advanced Web Metrics with Google Analytics is a complete guids on the web analysis topic.

Do you have to build a landing page? Which are the best strategies? How to get the resources? Hot to measure the success and the ROI? Landing Page Optimization is the book to read, but I warn you that being this book a complete reference, sometimes especially when it comes to statistics, it becomes a little bit "hard" to read.

RSS feed

Tracciare i like di Facebook con Google Analytics, la vera soluzione!

Tracciare i like di Facebook con Google Analytics, la vera soluzione!

Le interazioni sociale dei vostri clienti sono molto importanti per analizzare il loro impatto nelle vostre conversioni.
Leggendo la guida ufficiale degli sviluppatori di Google Analytics, la soluzione sembrerebbe essere quella di usare il codice seguente:

<div id="fb-root"></div>
<script>
    window.fbAsyncInit = function()
    {
        // init the FB JS SDK
        FB.init(
        {
            appId : 'YOUR_APP_ID',
            channelUrl : '//WWW.YOUR_DOMAIN.COM',
            status : true,
            cookie : true,
            xfbml : true
        });

        // Add event subscripion here
        FB.Event.subscribe('edge.create', function (targetUrl)
        {
            _gaq.push(['_trackSocial','facebook', 'like', targetUrl]);
        });
    };

    // Load the SDK's source Asynchronously
    (function(d)
    {
        var js, id = 'facebook-jssdk', ref = d.getElementsByTagName('script')[0];
        if (d.getElementById(id)) {return;}
        js = d.createElement('script'); js.id = id; js.async = true;
        js.src = "//connect.facebook.net/en_US/all.js";
        ref.parentNode.insertBefore(js, ref);
    }(document));
</script>

Se invece si vuole aggiungere l'event handler a runtime, la soluzione corretta è quella di usare l'evento window.fbAsyncInit per aggiungere in coda all'inizializzazione dell'SDK la sottoscrizione all'evento "mi piace".
Nel codice seguente ho usato jQuery per sottoscrivere l'evento dopo l'inizializzazione del DOM.

$ (function ()
{
    var exsistingFbAsyncInit = window.fbAsyncInit;
    if (exsistingFbAsyncInit == null)
        window.fbAsyncInit = function ()
        {
            FB.Event.subscribe('edge.create', function (targetUrl)
            {
                _gaq.push(['_trackSocial','facebook', 'like', targetUrl]);
            });
        };
    else
        window.fbAsyncInit = function ()
        {
            exsistingFbAsyncInit();
            FB.Event.subscribe('edge.create', function (targetUrl)
            {
                _gaq.push(['_trackSocial','facebook', 'like', targetUrl]);
            });
        };
})
;

You are the reader number 4,432.

Comments

comments powered by Disqus
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 dramatically increase social media LIKEs to your web site

Next article

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

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
Blog

Scroll to top