Sha256: 4d1a46243fe1c299b264cc47649af18e60d61185efb0d30529aea6db74c46ee4

Contents?: true

Size: 1.73 KB

Versions: 1

Compression:

Stored size: 1.73 KB

Contents

<% if site.use_retargeting %>
  <% rc = site.retargeting_config %> 
  <%
  # Google audiences
  %><% rc.labels(request, page).each do |label| %>                                                  
    <script type='text/javascript'>
    /* <![CDATA[ */
    var google_conversion_id = <%= rc.conversion_id %>;
    var google_conversion_label = "<%= raw label %>";
    var google_custom_params = window.google_tag_params;
    var google_remarketing_only = true;
    /* ]]> */
    </script>
    <script type='text/javascript' src='//www.googleadservices.com/pagead/conversion.js'></script>
    <noscript>
    <div style='display:inline;'>
    <img height='1' width='1' style='border-style:none;' alt='' src='//googleads.g.doubleclick.net/pagead/viewthroughconversion/<%= raw rc.conversion_id %>/?value=1.00&amp;currency_code=USD&amp;label=<%= raw label %>&amp;guid=ON&amp;script=0'/>
    </div>
    </noscript>
  <% end %>
  <%
  # Facebook audiences
  %><% if rc.fb_pixel_id && rc.fb_pixel_id.strip.length > 0 %>    
    <script>(function() {
      var _fbq = window._fbq || (window._fbq = []);
      if (!_fbq.loaded) {
        var fbds = document.createElement('script');
        fbds.async = true;
        fbds.src = '//connect.facebook.net/en_US/fbds.js';
        var s = document.getElementsByTagName('script')[0];
        s.parentNode.insertBefore(fbds, s);
        _fbq.loaded = true;
      }
      _fbq.push(['addPixelId', '<%= raw rc.fb_pixel_id %>']);
    })();
    window._fbq = window._fbq || [];
    window._fbq.push(['track', 'PixelInitialized', {}]);
    </script>
    <noscript><img height="1" width="1" alt="" style="display:none" src="https://www.facebook.com/tr?id=<%= raw rc.fb_pixel_id %>&amp;ev=PixelInitialized" /></noscript>
  <% end %>
<% end %>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
caboose-cms-0.5.197 app/views/caboose/blocks/_retargeting.html.erb