Announcement

Collapse
No announcement yet.

Need Today - MM4.24c Header Conditional for Facebook Tracking Pixels.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Need Today - MM4.24c Header Conditional for Facebook Tracking Pixels.

    I am trying to implement Facebook tracking pixels for some campaigns I will be launching later today.

    Facebook has several different ones. One for the actual conversions called “Conversion Pixel Tracking” to track sales. That one obviously is place in the header of checkout page, and another called “Custom Audiences Pixel Tracking” to track anyone who visits website.

    As you may recall MM4.24c has one header for all screens, thus conditionals need to be used in order to MM render value according to page. According to Facebook, one should Not use more than one tracking pixel on the same page (info https://developers.facebook.com/docs...roubleshooting) because it can create conflicts.

    Example of header page conditionals:

    Code:
    %IF(g.Screen EQ 'SFNT')%
        <link rel="canonical" href="http://www.MyDomain.com" />
    %IFEND%
    %IF(g.Screen EQ 'PROD')%
        <link rel="canonical" href="http://www.MyDomain/%prodcode%.html" />
    %IFEND%
    %IF(g.Screen EQ 'CTGY')%
        <link rel="canonical" href="http://www.MyDomain.com/%catcode%.html" />
    %IFEND%
    I was able to successfully incorporate Facebook "Conversion Tracking Pixel" in the header (below), but what parameter do I use for anything other than INVC page in order to display the other pixel tracking code to avoid conflict?:

    Example:

    Code:
     
    %begin_screen|INVC%
        (…FB Conversion Tracking Pixel Code…)
    %end_screen|INVC%
    Thank you, Bill Davis

    #2
    Re: Need Today - MM4.24c Header Conditional for Facebook Tracking Pixels.

    Never mind, I figured it out.

    Code:
    %IF(g.Screen EQ 'INVC')%
        (…FB Conversion Tracking Pixel Code…)
    %ELSE%
        (…FB Custom  Audiences Pixel Tracking Code…)
    %IFEND%
    Thank you, Bill Davis

    Comment


      #3
      Re: Need Today - MM4.24c Header Conditional for Facebook Tracking Pixels.

      Yeah, I couldn't remember if OUI used IFELSE or just ELSE.
      Leslie Kirk
      Miva Certified Developer
      Miva Merchant Specialist since 1997
      Previously of Webs Your Way
      (aka Leslie Nord leslienord)

      Email me: [email protected]
      www.lesliekirk.com

      Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr

      Comment

      Working...
      X