WordPress.org

Ready to get started?Download WordPress

Forums

Google Analytics Dashboard
[resolved] Embedding Stats in Post template (single.php) (2 posts)

  1. hchicha
    Member
    Posted 2 years ago #

    Hello freinds,

    Can you tell me , how can i embedd stats in post (single.php) so, reader can view the stat on every post ?

    I've tried the code given here (in other notes area) , but this showing anly a graph, not numbers !!

    Can anyone help me please ?

    Thanks

    http://wordpress.org/extend/plugins/google-analytics-dashboard/

  2. hchicha
    Member
    Posted 2 years ago #

    No one to help ? :)

    I've found it alone :))

    To do so, having number in place of the image .... you have to use this function: replace "sparkline" with "text"

    <?php $data = new GADWidgetData(); echo $data->gad_pageviews_text(substr($_SERVER["REQUEST_URI"], -20)); ?>

    VoilĂ  :)

    Thanks all

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic