Feeds

Setup Metrics with Textpattern

PerformancingAds
Submitted by cjiang on March 15, 2006 - 10:24pm in

I am using the Textpattern CMS on two blogs, and neither seems to be tracking hits. I've had the code snipplet embedded in both sites for about a day now, but I'm still not getting anything under "my metrics." Any help would be appreciated. Thanks in advance!


Did you set it up as "other"

Did you set it up as "other" or "non blog"?

Using metrics with textpattern

I have metrics running with textpattern, i've set it up as "Other", and i copied the counter code at the end of my HTML template. Works.
I've also managed to setup the article template that articles are counted correctly, but comments aren't counted.

I set it up as other, and I

I set it up as other, and I threw the code into the end of a footer form, right above the as suggested. Still isn't working.

If it helps, when I view

If it helps, when I view source it says

That is, it doesn't actually spew out the contents of stats.js, basicstats.js, etc.

Your blogs are in framesets.

Your blogs are in framesets. You need to add your blogs with the domain of the actual host not the frameset otherwise the system will ignore the data as it will think it is not for your blog but someone elses

Textpattern setup ...

I used 'other' blog.
I added the main PMetrics script line into the used footer(s) forms.
I added the code for post title and post categories into article, archive and static forms. Simply below the headlines (check here for technical-details.txt).

            z_post_title="<txp:title />";
            z_post_category="<txp:category1 />, <txp:category2 />";

Where to put the codes may pretty much depend on your used template(s) and on your used forms!

Please do also check the follow-up comments on this posts/comment about "PMetrics: multiple categories?".

Now I am awaiting awaiting the results ... the light is green already :-)

Update 1: BUG - Like with Blogger the main page is referenced to post titles. Even more confusing one link to a post is referenced to the blog title

Textpattern

Markus, what you need is some logic that says "if this is not the index page or archive page then ..." that selectively populates the z_ variables. I dont know what that would be in textpattern, in drupal there is a variable called $main.

Textpattern and z_variables

Chris, I have read your two sentences now about ten times.
My understanding of your 'you need some logic' is to differentiate between homepage (definition: pages with lists of articles) and one article sub-pages (definition: the shown page is the static page for one piece of content like 'one article').

So I have to have the z_variables on every page which contains more then one article item. Do I get that right?

In Textpattern every page is build out of forms (imagine it like
'bricks') which can bee combined freely.

My 'brick' for an article on the homepage is 'homepost'.

<div class="post homepost">
<h2><txp:permlink><txp:title /></txp:permlink></h2>
<script type="text/javascript">
            z_post_title="<txp:title />";
            z_post_category="<txp:category1 />, <txp:category2 />";
        </script>
<txp:article_image/><txp:excerpt />
[...]
</div><!-- post -->

Now PMetrics kicks in on every 'article list' page through the Javascript which resides in the footer 'brick' and the z_variables.

On every 'static page' form I deleted the z_variable part.

But there is still the issue that 'homepages' are not listed correctly in PMetrics. Instead of showing the homepage title PMetrics lists the last post title which is confusing. That is true for my Blogger blogs and the Textpattern site!

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <h2> <h3> <h4> <img> <div> <a> <em> <strong> <code> <ul> <ol> <li> <dl> <dt> <dd> <blockquote> <span> <table> <td> <tr> <caption> <th> <hr> <pre> <br> <p> <object> <param> <embed> <strike>
  • Lines and paragraphs break automatically.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
6 + 6 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.