Skip to content

Error while using piwik tracking code in custom header

Moved Technical Support
1 1 1.7k 1
  • Re: How To: Piwik and NodeBB

    I tried to use the code mentioned in this topic, but am getting an error in console. Webpage where I added the code is: https://www.mbatious.com/recent

    Error:
    _paq.push() was used but Piwik tracker was not initialized before the piwik.js file was loaded. Make sure to configure the tracker via _paq.push before loading piwik.js. Alternatively, you can create a tracker via Piwik.addTracker() manually and then use _paq.push but it may not fully work as tracker methods may not be executed in the correct order. ["setCustomUrl", "https://www.mbatious.com/recent"]

    Can anybody help me come out of this?


Suggested Topics


  • Using customizer plugin to modify topic view

    Technical Support
    2
    0 Votes
    2 Posts
    795 Views
    phenomlabP
    Never mind - after looking at the slick theme, I realised that partials/breadcrumbs is being included at the top of the file, so this is the intended target
  • ajaxify error after override header template

    Technical Support
    7
    0 Votes
    7 Posts
    1k Views
    <baris>B
    Your initial header.tpl should work with the latest version of nodebb, app.template is no longer necessary since that is available in ajaxify.data.template
  • custom javascript error

    Technical Support
    3
    0 Votes
    3 Posts
    2k Views
    oplik0O
    Just a correction: it's not that you don't need the <script> - it's just illegal unless you're writing something like jsx. When run this will immediatly cause Uncaught SyntaxError: Unexpected token '<' - because everything you put in custom Javascript is already put into a <script> tag. If you want to include another script either use some kind of imports (for example es modules) that works inside JS, or put the <script src=""> tag in custom header instead.
  • How to embed and use custom font

    Moved Technical Support
    6
    0 Votes
    6 Posts
    5k Views
    daniel aliakbariD
    hi every body. 1- i solve this by puting my font file into public/fonts folder 2- edit this line in my them variables.less: //** Load fonts from this directory. @icon-font-path: "fonts/"; //** File name for all font files. @icon-font-name: "Samim"; //** Element ID within SVG icon file. @icon-font-svg-id: "Samim"; 3- change font-family to "Samim"
  • Using custom templates

    Moved Technical Support templates
    2
    0 Votes
    2 Posts
    3k Views
    julianJ
    Yessir

Looks like your connection to NodeBB Community was lost, please wait while we try to reconnect.