-
AuthorPosts
-
January 26, 2016 at 6:27 pm #765895
ChristianParticipantHello,
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!
January 26, 2016 at 6:28 pm #765898
ChristianParticipantAdding 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>January 26, 2016 at 8:18 pm #766015
John EzraMemberHi 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 credentialsDon’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!
January 27, 2016 at 3:12 pm #767556
ChristianParticipantSOLUTION:
The RAW element did the trick perfectly! Should have “read the docs”… LOLJanuary 27, 2016 at 9:04 pm #767980
Prasant RaiModeratorYou’re welcome! We are just glad we were able to help you out.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-765895 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
