Presslabs
Forum Replies Created
-
Forum: Plugins
In reply to: [Toplytics] Can’t use toplytics_results function in themeHello,
We’ll look into this and come back to you when we have more information.
Best regards,
Forum: Plugins
In reply to: [Toplytics] Bedrock + Composer + ToplyticsHello @anebi85,
We have just pushed a new version 4.0.6. Pentru try again and let us know how it works.
Best regards,
~Presslabs TeamForum: Plugins
In reply to: [Toplytics] Bedrock + Composer + ToplyticsHello,
We will investigate this issue, and we’ll come back to you when we have more information.
Best,
Forum: Plugins
In reply to: [Toplytics] New version downloadHere is the v4.0.3 with a few more bugfixes: https://dl.presslabs.net/toplytics_4.0.3.zip
Forum: Plugins
In reply to: [Toplytics] Numbers boostedHello @mattdgn ,
We have a fix in place for this, can you please update the plugin with this version: https://dl.presslabs.net/toplytics4.0.3.zip
Forum: Plugins
In reply to: [Toplytics] Numbers boostedGiven the data in GA API is coming correctly, perhaps is a bug in the plugin? Can you try to use a smaller timeframe say 1 week or day and compare that to the GA data?
Forum: Plugins
In reply to: [Toplytics] Numbers boostedHello @mattdgn,
The data should be viewable in GA at Behaviour > Site Content > All Pages.
Given the exact same time period and URL analysed, a small difference is expected between the data you see in GA web interface and the data that is being output by their API endpoints.
The GA web interface uses data sampling while the API does not.
https://support.google.com/analytics/answer/2637192However I am not sure if a 5x increase in pageviews can be the result of this? In my experience a variation of ~10-20% can happen, usually even lower then this, but a x times increase is unsual.
Another reason can be if you have that option to “exclude bot traffic” from your data in the web interface. That would also apear in the API data AFAIK.
Forum: Plugins
In reply to: [Toplytics] Upload Auth Config File: do not workQuick update for the previous code to take into consideration some edge-cases, please you this instead:
<?php $toplytics_featured_image = wp_get_attachment_image_src( get_post_thumbnail_id( $post ) ); if (is_array($toplytics_featured_image) && $toplytics_featured_image[0]) : ?> <a class="toplytics-anchor" href="<?php echo $post['permalink']; ?>" title="<?php echo $post['title']; ?>" target="<?php echo ( isset( $target ) && $target ) ? $target : 'self'; ?>"> <img src="<?php echo $toplytics_featured_image; ?>" alt="<?php echo $post['title']; ?>" /> </a> <?php endif; ?>
Forum: Plugins
In reply to: [Toplytics] Upload Auth Config File: do not workSure @pako69, it is possible. Follow the steps:
1. Copy the resources > views > frontend > widget.template.php file to your active theme folder and rename it to
toplytics-template.php
(if you have not done this already)
2. Make sure you’re not using Ajax loading from your widget settings.
3. Open the newtoplytics-template.php
file you have just copied and renamed and edit the part between lines 142 and 156. Here you should add the featured image. For example, you could add it on line 146 by adding the bellow code right after the<li class="toplytics-list-item">
code on a new line:<?php $toplytics_featured_image = wp_get_attachment_image_src( get_post_thumbnail_id( $post ) )[0]; if ($toplytics_featured_image) : ?> <a class="toplytics-anchor" href="<?php echo $post['permalink']; ?>" title="<?php echo $post['title']; ?>" target="<?php echo ( isset( $target ) && $target ) ? $target : 'self'; ?>"> <img src="<?php echo $toplytics_featured_image; ?>" alt="<?php echo $post['title']; ?>" /> </a> <?php endif; ?>
I have not tested this code, so please do let me know how it works for you. You might need to adjust it a bit further for it to look good via CSS.
Forum: Plugins
In reply to: [Toplytics] Upload Auth Config File: do not workHi @pako69,
That option will add the ‘featured_image’ parameter in the JSON output via WP REST API or via the custom path you configured. In the backend, it uses the get_the_post_thumbnail_url function to get the URL of the image. You can also use this in your custom code if you’re not using AJAX to load the post content. Only the AJAX method uses this custom JSON file so it’s not required to enable this.
You can find more details and implementation examples in the docs here: https://www.presslabs.com/docs/code/toplytics/how-to-use-toplytics/
Right at the very end of this help page you can see an example:
$toplytics_results = toplytics_get_results( $toplytics_args ); if ( $toplytics_results ) { $k = 0; foreach ( $toplytics_results as $post_id => $post_views ) { echo (++$k) . ') <a href="' . get_permalink( $post_id ) . '" title="' . esc_attr( get_the_title( $post_id ) ) . '">' . get_the_title( $post_id ) . '</a> - ' . $post_views . ' Views<br />'; } }
Where you could for example get the featured image using get_the_post_thumbnail_url as such:
get_the_post_thumbnail_url($post_id);
Forum: Plugins
In reply to: [Toplytics] Upload Auth Config File: do not workI see, yet the ZIP with the new version is ~10MB due to the large vendor folder. Please let me know how it works when uploading via FTP?
Forum: Plugins
In reply to: [Toplytics] Upload Auth Config File: do not workI see. Please e-mail us at support[at]presslabs.com and if possible share an admin account with us so we can further investigate this issue. You can use https://onetimesecret.com/ to share sensitive info like login details when e-mailing us.
Forum: Plugins
In reply to: [Toplytics] Upload Auth Config File: do not workHi @pako69,
Please try to install this version and let me know how it works for you:
https://dl.presslabs.net/toplytics_4.0.2.zipForum: Plugins
In reply to: [Toplytics] Upload Auth Config File: do not workHi @pako69,
If you’re installing from our GIT repo, please make sure to use
composer install --prefer-dist --o
to generate the necessaryvendor
files. That is why it’s throwing a file not an existing error for the autoloader.Forum: Plugins
In reply to: [Toplytics] new versionHello @komaradriant,
That is correct, v4.0.2 is the latest version.