   {argv} = require 'optimist'
 
   prefetchedFeeds = {}
-  {client, intro, landing} = options
+  campaignData = {}
+  {bongoModels, client, intro, landing} = options
 
   createHTML = ->
     replacer    = (k, v)-> if 'string' is typeof v then encoder.XSSEncode v else v
     encodedFeed = JSON.stringify prefetchedFeeds, replacer
+    encodedCampaignData = JSON.stringify campaignData, replacer
 
     landingOptions =
       page         : landing

    <script src='/a/js/koding.#{KONFIG.version}.js'></script>
    #{if landing then "<script src='/a/js/landingapp.#{ KONFIG.version }.js'></script>" else ''}
    <script>KD.prefetchedFeeds=#{encodedFeed};</script>


    <!-- GOOGLE ANALYTICS -->

    """

  generateScript = ->
    bongoModels.JReferral.isCampaingValid (err, status, campaign)->
      if not err
        content = campaign?.content
        campaignData = {status, content}

      html = createHTML()
      return callback null, html

  {delegate} = options.client.connection
  # if user is exempt or super-admin do not cache his/her result set
