Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #765895
    Christian
    Participant

    Hello,

    Looking for some guidance on adding a pixel tracker.
    Using Cornerstone, settings, custom JS and pasting the code right in.
    Problem: The webpage outputs the code in a different format and is not usable.

    Supplied code:

    <script>
    var SWPX = SWPX || {};
    SWPX.cmd = SWPX.cmd || [];
    SWPX.cmd.push(function() {
    SWPX.pixel.setPixel(‘g7rb’);
    // Uncomment the following line to place an identifer
    // SWPX.pixel.setIdentifier(”);
    SWPX.pixel.fire();
    });
    </script>
    <script src=”//px.tackingdomain.com/px.js” async></script>
    <noscript>

    </noscript>

    I tried this format, stripping the js tags:

    var SWPX = SWPX || {};
    SWPX.cmd = SWPX.cmd || [];
    SWPX.cmd.push(function() {
    SWPX.pixel.setPixel(‘g7rb’);
    // Uncomment the following line to place an identifer
    // SWPX.pixel.setIdentifier(”);
    SWPX.pixel.fire();
    });

    <script src=”//px.trackingdomain.com/px.js” async></script>
    <noscript>

    </noscript>

    Output using inspect element:

    <script id=”cornerstone-custom-js”>;var SWPX=SWPX||{};SWPX.cmd=SWPX.cmd||[];SWPX.cmd.push(function(){SWPX.pixel.setPixel(‘g7rb’);SWPX.pixel.fire()});<script;src=’//px.trackingdomain.com/px.js’;async></script>;<noscript>;;</noscript>'</script>

    The pixel tracker is only needed for a specific page and not globally.

    Thank you in advance!

    #765898
    Christian
    Participant

    Adding the code using the code tag in the text editor.

    var SWPX = SWPX || {};
    SWPX.cmd = SWPX.cmd || [];
    SWPX.cmd.push(function() {
      SWPX.pixel.setPixel('g7rb');
    // Uncomment the following line to place an identifer
    // SWPX.pixel.setIdentifier('');
    SWPX.pixel.fire(); 
    });
    
    <script src="//px.trackingdomain.com/px.js" async></script>
    <noscript>
    <img src="//px.trackingdomain.com/px/g7rb" height="1" width="1">
    </noscript>
    #766015
    John Ezra
    Member

    Hi there,

    Thanks for writing in! Your request is for inserting a 3rd-Party script. Support in this area is actually beyond scope, though we do try to assist wherever possible, just mentioning to set expectations. Thanks for understanding.

    Have you tried using the RAW element instead of the text element?

    If that doesn’t help, would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:

    – Link to your site
    – WordPress Admin username / password
    – FTP credentials

    Don’t forget to select Set as private reply. This ensures your information is only visible to our staff.

    If we are not able to find an quick fix, you may need to engage a developer for a custom solution.

    You can check out our recommended partners: https://theme.co/x/member/custom-development/

    Let us know how that goes. Hope this helps – thanks!

    #767556
    Christian
    Participant

    SOLUTION:
    The RAW element did the trick perfectly! Should have “read the docs”… LOL

    #767980
    Prasant Rai
    Moderator

    You’re welcome! We are just glad we were able to help you out.

  • <script> jQuery(function($){ $("#no-reply-765895 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>