Tagged: cornerstone
-
AuthorPosts
-
November 8, 2016 at 4:03 pm #1249255
I am trying to place a script in my website for advertising. I added it in a text block, but that isn’t working. How can I add a javascript code snippet to my website and have it show up?
November 8, 2016 at 6:21 pm #1249376Hi there,
Try adding the code in a Raw Content element.
Hope this helps.
November 8, 2016 at 6:33 pm #1249381This reply has been marked as private.November 9, 2016 at 1:01 am #1249678Hi there,
It should work if the code is fine. If the external script needs to be added to header, you can follow this – https://community.theme.co/forums/topic/add-tracking-code-to-header/#post-776299
Cheers!
November 9, 2016 at 10:49 am #1250287It isn’t working. The code I provided was the exact code given to me. That is what I put into the Raw Content area and the code works when tested elsewhere.
November 9, 2016 at 11:34 am #1250375Hi There,
I’ve tried with your code and it’s working fine.
Please provide us with your admin account & website URL so we can take a closer look.
Thanks.
November 9, 2016 at 12:18 pm #1250427This reply has been marked as private.November 9, 2016 at 5:25 pm #1250753Hi There,
The code works on my end, please clear any caching/optimiser plugin your site might have.
Thanks.
November 9, 2016 at 6:16 pm #1250783I cleared cache from the plugin and also cleared cookies and history of the site from my browser. The ad still isn’t showing up.
November 9, 2016 at 6:33 pm #1250793This reply has been marked as private.November 9, 2016 at 7:01 pm #1250911If I run two ads, it is replacing the top one with the bottom one. Even though it specifies the sizes it will change them. All of this is correlated to some javascript issue with the theme and cornerstone.
November 9, 2016 at 11:01 pm #1251153Hello There,
I am another staff checking on this thread! Upon checking, there is a JS error on the page:
http://prntscr.com/d5dhz9It sounds like you might be having an issue with a third party AD script. Regretfully, we cannot provide support for third party plugins or scripts as our support policy in the sidebar states due to the fact that there is simply no way to account for all of the potential variables at play when using another developer’s plugin or script. Because of this, any questions you have regarding setup, integration, or troubleshooting any piece of functionality that is not native to X will need to be directed to the original developer.
Thank you for your understanding.
November 9, 2016 at 11:05 pm #1251156This has nothing to do with a third party. It is a script for an ad that needs to be placed in the raw content element. Should it be placed within a different Cornerstone element for it to work? There is no third party to go to. It just simply isn’t working in the X-Theme.
November 10, 2016 at 12:40 am #1251229Hello There,
If you want to add a raw code or script in Cornerstone, the best element could do it is the Raw Content element. Any content or script you will add in the raw content element is considered as a 3rd party code especially if it comes from other source like the ad network.
Now using your code;
<div class="alignleft"> <script type="text/javascript"> amzn_assoc_ad_type = "banner"; amzn_assoc_marketplace = "amazon"; amzn_assoc_region = "US"; amzn_assoc_placement = "assoc_banner_placement_default"; amzn_assoc_campaigns = "software"; amzn_assoc_banner_type = "category"; amzn_assoc_p = "14"; amzn_assoc_isresponsive = "false"; amzn_assoc_banner_id = "1A6VS9NZQW89EZBP9CR2"; amzn_assoc_width = "160"; amzn_assoc_height = "600"; amzn_assoc_tracking_id = "analyticsente-20"; amzn_assoc_linkid = "6e6f2f15cc73216be682279493db14d3"; </script> <script src="//z-na.amazon-adsystem.com/widgets/q?ServiceVersion=20070822&Operation=GetScript&ID=OneJS&WS=1"></script> </div>
I tested this in my local install and it just works. I even use the code multiple times. You can see it here:
http://prntscr.com/d5e1gf
http://prntscr.com/d5e1p6Please keep in mind that there are times that you cannot see the contents of the raw content element working in Cornerstone preview. Most of the time, (assuming that there are no error with the code), it will display in the live page view.
Please make sure that you have inserted the correct code. If you insert with invalid quotes, it will not work out anymore. I have checked your site and see to it that the code is correct. The weird thing is that it has a JS error generated from the code itself. This is presented in this screenshot: http://prntscr.com/d5dhz9
There is something wrong with the code itself because it is not showing in your site.
Hope this make sense.
November 10, 2016 at 1:23 am #1251267I got it to show up now in the right hand side and in the middle of the page. How do I center those ads in the raw content element?
-
AuthorPosts