#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2005
    Location
    uk
    Posts
    113
    Rep Power
    14

    Redirecting a Page


    Hi, I don't know anything about Javascript.

    But I want to send people to a page on my site which runs a script in the header of the page, and then instantly redirects the visitor to another web page.

    I actually want to run the Facebook Pixel code before redirecting.

    This is what I am trying in the head section, but it's not working...

    Code:
     <!-- Facebook Pixel Code -->
    <script>
      !function(f,b,e,v,n,t,s)
      {if(f.fbq)return;n=f.fbq=function(){n.callMethod?
      n.callMethod.apply(n,arguments):n.queue.push(arguments)};
      if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
      n.queue=[];t=b.createElement(e);t.async=!0;
      t.src=v;s=b.getElementsByTagName(e)[0];
      s.parentNode.insertBefore(t,s)}(window, document,'script',
      'https://connect.facebook.net/en_US/fbevents.js');
      fbq('init', '1780816612138282');
      fbq('track', 'PageView');
    </script>
    <noscript><img height="1" width="1" style="display:none"
      src="https://www.facebook.com/tr?id=1780816612138282&ev=PageView&noscript=1"
    /></noscript>
    <!-- End Facebook Pixel Code -->  
    
    <script>
    <meta http-equiv="refresh" content="0;url=http://www.google.com" />
    </script>
    Any ideas?

    JH
  2. #2
  3. Lord of the Dance
    Devshed Specialist (4000 - 4499 posts)

    Join Date
    Oct 2003
    Posts
    4,148
    Rep Power
    2011
    You already have the meta refresh pointing to google.com.
    You should be able to change that to the URL page you want.

IMN logo majestic logo threadwatch logo seochat tools logo