WebSite X5Help Center

 
Elvis L.
Elvis L.
User

Project analysis error  en

Author: Elvis L.
Visited 1092, Followers 1, Shared 0  

Hi ,

after downloading cookies script from this page https://helpcenter.websitex5.com/post/106713 i went to section statistic ,seo and code under expert tab i added next code:

After oppening the head

<html>

<head>

<!-- Include jQuery -->

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>

<!-- Include you know cookiesDirective.js plugin -->

<script type="text/javascript" src="jquery.cookiesdirective.js"></script>

</head>


</html>

After opening the Body tag

<body>

<div id="eantics"></div>

<script type="text/javascript">

// Using $(document).ready never hurts

$(document).ready(function(){

// Cookie setting script wrapper

var cookieScripts = function () {

// Internal javascript called

console.log("Running");

// Loading external javascript file

$.cookiesDirective.loadScript({

uri:'external.js',

appendTo: 'eantics'

});

}

/* Call cookiesDirective, overriding any default params

*** These are the defaults ***

explicitConsent: true,

position: 'top',

duration: 15,

limit: 0,

message: null,

cookieScripts: null,

privacyPolicyUri: 'Pravno-obvestilo.html',

scriptWrapper: function(){},

fontFamily: 'helvetica',

fontColor: '#FFFFFF',

fontSize: '13px',

backgroundColor: '#000000',

backgroundOpacity: '75',

linkColor: '#CA0000'

*/

$.cookiesDirective({

privacyPolicyUri: 'Piskotki.html',

explicitConsent: true,

position : 'top',

scriptWrapper: cookieScripts,

cookieScripts: 'Google Analytics, My Stats Ultimate ',

backgroundColor: '#0B3B0B',

linkColor: '#ffffff'

});

});

</script>

</body>

the script works fine but after i went through, analysis error poped up

"there are errors in the custom code entered in the page properties"

Posted on the
1 ANSWERS - 1 USEFUL - 1 CORRECT
Anthony A.
Anthony A.
User

remove these from your script/code and test it again

from head section remove:

<html>

<head>

</head>


</html>

from the secound part remove:

<body>

</body>

if this post is the correct answer, please mark this answer as correct answer.

------------------------------------------------------------

Good Luck

Read more
Posted on the from Anthony A.