Skip to content

[How to] Set Goals in Google Analytics for Facebook Apps Thank You Page

 I came across this question when I checked my official mails this morning.

Problem: How to Set Goals in Google Analytics for Facebook Apps Thank you page?

Description : Why it is a problem? as there is only one static URL in Facebook Apps, So we can not use it as Thank you page in Goal Settings. One single solution that 1st came into my mind was to use the domain URL of apps where it is hosted as Facebook is fetching it from iFrame so if we use the domain URL of apps it may work, but life ain’t that simple, the apps we created is with Like Gate which means we can not proceed to further pages unless we like the page and in domain URL there is no way to get into further pages, also I tried to get URL manually but all it came as .tpl format and once I hit the enter .tpl file get downloaded.

Solution: When I discussed it with my team, many went into deep thinking mode of how to solve this problem, But one came with easy solution.

Virtual Pageviews

Use the _trackPageview() method along with a URL you fabricate in order to track clicks from users that do not lead to actual website pages on your site. In general, we recommend you use Event Tracking for tracking downloads, outbound links, PDFs or similar kinds of user interactions. This is because virtual pageviews will add to your total pageview count. However, if you want to configure goals based on clicks to PDFs or downloads, you need to use this method (but be aware that these clicks will be tallied as part of your overall pageview count). For tracking Flash or Silverlight content, we recommend that you use the Adobe Flash Tracking library or the Microsoft Silverlightcomponent.

We need to add this line –

_gaq.push([‘_trackPageview’, ‘/downloads/pdfs/corporateBrief.pdf’]);

You can replace “/downloads/pdfs/corporateBrief.pdf” in the example above with any URL or filename you choose.

Here is how the Google Analytics Code may look like –

// _gaq.push(['_trackPageview', '/downloads/pdfs/corporateBrief.pdf']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + ''; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); // ]]>

  • Pingback: best online stores for teenage girls

  • Pingback: chilton repair manuals fiat

  • Pingback: read article

  • Pingback: homebase promo code

  • Pingback: europcar australia


    I ADAMS KEVIN, a representative of Aiico Insurance plc, we trust and respect for individual differences in day out a loan. We will provide 2% of the loan’s interest rate. If you are interested in this business contact us by e-mail:
    ( now transfer their loan documents issued properly. Do you need a loan to set up business or school
    if you are very welcome to Aiico Insurance plc. You can also contact us by email: (aiico insurance We
    first week can request a balance transfer.

  • Pingback: sacramento real estate broker

  • Pingback: source website

  • Pingback: agree with this

  • aguidis

    Thank you for sharing this information !