Code Monkey home page Code Monkey logo

wp-parsely's Introduction

Parse.ly

Stable tag: 3.14.3
Requires at least: 5.2
Tested up to: 6.5
Requires PHP: 7.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Tags: analytics, statistics, stats, content marketing, parsely, parsley, parse.ly
Contributors: parsely, hbbtstar, jblz, mikeyarce, GaryJ, parsely_mike, acicovic, mehmoodak, vaurdan

The Parse.ly plugin facilitates real-time and historical analytics to your content through a platform designed and built for digital publishing.

Description

Designed and built for digital publishers, Parse.ly helps you understand how your audience is connecting to your content.

Thousands of writers, editors, site managers, and technologists already use Parse.ly to understand what content draws in website visitors, and why. Using our powerful dashboards and APIs, customers build successful digital strategies that allow them to grow and engage a loyal audience.

Join industry leaders -- like NBA, Slate, News Corp, and Condé Nast -- who already use Parse.ly to bring clarity to content, audience, and analytics.

Feedback, suggestions, questions or concerns? Open a new GitHub issue or email us at [email protected]. We always want to hear from you!

NOTE: The plugin requires an active Parse.ly account. Sign up for a free Parse.ly demo.

Features

The wp-parsely plugin is packed with features that allow for a seamless integration process, and brings the power of the Parse.ly dashboard into WordPress.

Automated integration

The plugin automatically inserts the Parse.ly metadata and JavaScript in all published pages and posts (Custom Post Types are supported). It also provides a settings page to customize your integration, with options including:

  • Output Parse.ly metadata as JSON-LD or repeated meta tags.
  • Choose whether logged-in users should be tracked.
  • Define how to track every Post Type (as Post, Non-Post or no tracking).

The Parse.ly Content Helper

The Content Helper is a set of content insight tools including:

  • The Parse.ly Dashboard Widget - Displays the site's top posts in the WordPress Dashboard.
  • The Parse.ly Stats Column - Displays published post performance for the last 7 days in Post Lists.
  • The Parse.ly Editor Sidebar - This sidebar is integrated into the WordPress Editor and offers insights about the content currently being edited such as:
    • Title Suggestions - Generates title suggestions for the post/page currently being edited.
    • Smart Linking - Automatically adds links to the current content that point to the most relevant and top-performing posts.
    • Related Posts - Displays a list of the website’s most successful posts, similar to the post/page currently being edited.
    • Performance Stats - Displays performance metrics about the content currently being edited.
  • The Parse.ly Excerpt Generator - A Post Editor settings enhancement that generates an excerpt for the post/page currently being edited.

The Parse.ly Recommendations Block

The plugin includes a Recommendations Block that displays a list of posts related to the currently viewed post/page. The Block is useful for showcasing related content to visitors, and it can also be used in Site Editing mode or as a Block-based Widget.

Advanced integrations support

While the plugin works out of the box for basic integrations, it offers a host of features that easily allow for advanced integration scenarios:

Documentation and resources

IMPORTANT: If you are a WordPress VIP customer, please consult the WordPress VIP documentation for more details.

Sample Parse.ly metadata

The standard Parse.ly JavaScript tracker inserted before the closing body tag:

<script id="parsely-cfg" data-parsely-site="example.com" src="https://cdn.parsely.com/keys/example.com/p.js"></script>

A sample JSON-LD structured data for a home page or section page:

<script type="application/ld+json">
{"@context":"http:\/\/schema.org","@type":"WebPage","headline":"WordPress VIP","url":"http:\/\/wpvip.com\/"}
</script>

A sample JSON-LD meta tag and structured data for an article or post:

<script type="application/ld+json">
{"@context":"http:\/\/schema.org","@type":"NewsArticle","mainEntityOfPage":{"@type":"WebPage","@id":"http:\/\/wpvip.com\/2021\/04\/09\/how-the-wordpress-gutenberg-block-editor-empowers-enterprise-content-creators\/"},"headline":"How the WordPress Gutenberg Block Editor Empowers Enterprise Content Creators","url":"http:\/\/wpvip.com\/2021\/04\/09\/how-the-wordpress-gutenberg-block-editor-empowers-enterprise-content-creators\/","thumbnailUrl":"https:\/\/wpvip.com\/wp-content\/uploads\/2021\/04\/ladyatdesk.png?w=120","image":{"@type":"ImageObject","url":"https:\/\/wpvip.com\/wp-content\/uploads\/2021\/04\/ladyatdesk.png?w=120"},"dateCreated":"2021-04-09T15:13:13Z","datePublished":"2021-04-09T15:13:13Z","dateModified":"2021-04-09T15:13:13Z","articleSection":"Gutenberg","author":[{"@type":"Person","name":"Sam Wendland"}],"creator":["Sam Wendland"],"publisher":{"@type":"Organization","name":"The Enterprise Content Management Platform | WordPress VIP","logo":"https:\/\/wpvip.com\/wp-content\/uploads\/2020\/11\/cropped-favicon-dark.png"},"keywords":[]}
</script>

Contributing

Development, code hosting and issue tracking of this plugin happens on the wp-parsely GitHub repository. Active development happens on the develop branch and releases are made off the trunk branch.

To run the plugin locally or to contribute to it, please check the instructions in the CONTRIBUTING file.

Installation

The plugin requires an active Parse.ly account. Sign up for a free demo of Parse.ly.

For more information, please visit the installation instructions in the official documentation.

Frequently Asked Questions

Please visit the Commonly Asked Questions page in the official documentation.

Changelog

Please visit the changelog.

Screenshots

  1. The Parse.ly Dashboard Widget, showing the website's top posts.
    Parse.ly Dashboard Widget
  2. The Parse.ly Stats Column (on the right), showing information about content that is being tracked as Posts.
    Parse.ly List Column
  3. The Parse.ly Editor Sidebar, featuring the Title Suggestions panel.
    Parse.ly Editor Sidebar - Title Suggestions
  4. The Parse.ly Editor Sidebar, featuring the Smart Linking panel.
    Parse.ly Editor Sidebar - Smart Linking
  5. The Parse.ly Editor Sidebar, featuring the Related Posts panel.
    Parse.ly Editor Sidebar - Related Posts
  6. The Parse.ly Editor Sidebar, featuring the Performance Stats panel.
    Parse.ly Editor Sidebar - Performance Stats
  7. The Parse.ly Excerpt Generator in the Post Editor's settings.
    Parse.ly Excerpt Generator
  8. The Recommendations Block, showcasing links to related content on your site.
    Parse.ly Recommendations Block
  9. A view of the Parse.ly Dashboard Overview. Parse.ly offers analytics that empower you to better understand how your content is performing.
    Parse.ly Dashboard Overview

wp-parsely's People

Contributors

acicovic avatar aldraco avatar chriszarate avatar dan-blanchard avatar davisshaver avatar dependabot[bot] avatar garyjones avatar github-actions[bot] avatar harrisdavid avatar hbbtstar avatar htdat avatar jblz avatar joshuarrrr avatar katjwinter avatar mchandev avatar mehmoodak avatar micahwave avatar mikeyarce avatar mjangda avatar mockenoff avatar mraakashshah avatar msukmanowsky avatar norcross avatar pauarge avatar rebeccahum avatar richeymichael avatar ryanwelcher avatar sjinks avatar srtfisher avatar vaurdan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wp-parsely's Issues

Compatibility with official Wordpress FBIA plugin

Per Wordpress:

"We've added a couple of compat layers into the FBIA plugin for some common plugins, but we can also do this outside of the plugin. That'd probably be better for you, as you can maintain that code yourselves without relying on us and it can sit alongside the AMP integration.

The Google Analytics code is a good example: https://github.com/Automattic/facebook-instant-articles-wp/blob/master/compat/class-instant-articles-google-analytics-for-wordpress.php

In the Parse.ly plugin, you could add a class with a similar structure.

The key bit is to hook into instant_articles_compat_registry_analytics to register your compatibility layer with the FBIA plugin.

Then, get_raw_embed_code() simply returns the HTML. This HTML is then put through the Facebook Instant Article SDK to produce FBIA-compatible markup.

In the GA example you can see that get_raw_embed_code() goes elsewhere to fetch the code, but you can do that however works best for you."

Make sure LD+JSON is schema compliant

On vanilla WP installs, the WebPage JSON is not schema compliant according to Google's structured data tool. We should make sure that all the JSON the plugin outputs has no errors in the structured data tool, for index pages or for post pages.

Allow users to add "top posts" widgets easily to templates

As an author/admin of a WordPress blog, I'd like to be able to easily add a widget to my blog that shows the top posts so that users can easily see popular content and (hopefully) remain on my site.

I'd be able to configure this widget to limit to a specific time range and style it to my needs.

Revisit author name grabbing logic

We've gotten reports that we aren't fetching author name properly in parsely-page values. Need to revisit the logic there and ensure we're pulling author name correctly.

Add roadmap.md

To encourage a wider range of users to contribute to wp-parsely, we should develop and maintain a roadmap document hosted here on github that allows users to understand various ways they can contribute to the future of the plugin.

I'll put forward some initial ideas, but will look to others to improve on / curate the list.

Add content recommendations

Parse.ly customers have the ability to display personalized or contextual content recommendations on their site with the Parse.ly API. We should enable this maybe via a sidebar widget?

Add setting for disabling JS

Some publishers want to use the plugin only for metadata, and use Tealium / Segment or other tag managers to manage the JS. There should be an option in settings to use our plugin just for metadata and not for JS

Clean up the settings page

We're more than a little bit text heavy on the settings page. Much of the information is good, but we don't need it in everyone's faces all the time and some of the copy is probably too verbose. We should migrate to using something like https://jqueryui.com/tooltip/ to show information on demand maybe.

Add multiple author support

Parse.ly recently introduced multiple author support via parsely-meta, the plugin should support this at the same time we look at our author grabbing logic in #13.

Split main plugin file into smaller files

From 2018-05-02 VIP review:

the main plugin file and class Parsely is 1300 lines long, which is rather large. For future reviews it would reduce churn to break this into smaller files.

Option to maintain modifications to tracker placement

We frequently encourage publishers who face consistent discrepancies to move our tracking code closer to GA (or similar). They can modify this in their WP instance, but every new release would undo it.

Can we please make it an option to keep this (and other) modifications?

Check compatibility with WordPress 4.6

Got this email today -- new WordPress version comes out August 16th, so I guess we can test locally at that point and then update our ReadME? The field guide they link to will be a solid resource to peruse to gauge whether there are any changes that could affect this plugin.

WordPress 4.6 is scheduled to be released on 16 August 2016. Are your plugins ready?

After testing your plugins and ensuring compatibility, it only takes a few moments to change the readme "Tested up to:" value to 4.6. This information provides peace of mind to users and helps encourage them to update to the latest version.

Here are the current "Tested up to:" values for each of your plugins:

For each plugin that is compatible, you don't need to release a new version -- just change the stable version's readme value.

Looking to get more familiar with 4.6? Read this roundup post on the core development blog to check out the changes made to register_meta(), native fonts, persistent comment cache, Customizer APIs, WP_HTTP API, and much, much more: https://make.wordpress.org/core/2016/07/26/wordpress-4-6-field-guide/

Debug mode reports strict standards error that results in "headers already sent" notices

When I have debug mode turned on in WordPress, I get a notice saying "Strict standards: Redefining already defined constructor for class Parsely in .../wp-parsely.php on line 64".

This creates a headers already sent notice right after causing my site to stop loading. The only way around is to disable debug mode which the results in bugs in my code because I can't receive errors and the like.

Any idea of what the fix is exactly?

Find and remove escaped static strings?

From the 2018-05-02 WordPress VIP feedback:

I noticed a number of escaped static strings. Escaping is unnecessary for hardcoded strings, e.g.:

echo 'hello'; // this does not need escaping
echo esc_html( 'hello' ); // not a blocker, but unnecessary

It's only when variables are used that escaping is required. Static hardcoded primitives are fine.

I couldn't find any examples of this. @jtotoole or @richeymichael do you see what the referrer is talking about?

Not escaping unicode quotes properly

The New Yorker is using our WP Plugin and have recently run into an issue where some posts are not surfacing in the dashboard. Upon inspection, these posts are being discarded due to improperly escaped quotes. However, the quotes that are not properly escaped are the unicode equivalent of a double quote. ( " )

I've copied a few of the missing posts below:

http://www.newyorker.com/tech/elements/holocene-anthropocene-human-epoch

http://www.newyorker.com/culture/cultural-comment/possessed-james-brown-eighteen-minutes

http://www.newyorker.com/culture/cultural-comment/invisibilia-evolving-art-radio

In the first URL above, here is the part of the metadata tag that is breaking the tag.

tags; magazine","anthropocene","extinction","fossils","geologists","geology","holocene","jan zalasiewicz","nuclear weapons","stratigraphy","the european discovery of america","post_type: post"]}'

The first of the above tags has the unicode double quote and it is not escaped. Do we need to apply a change to our WP plugin? Or is this something that is happening on the New Yorker's end?

Support custom Section field option

Some publishers use custom variables instead of Section; unfortunately this means that their "section" keys are null when passed as is through the wp plugin.

Could we add a feature kind of like "use sections as tags" that allows publishers to specify what field they're using as their section?

Build horizontal version of recommendations widget

The WordPress recommendations widget currently comes in a vertical flavor, good for sidebars.

Might we get a horizontal version, something that could be used on index pages and at the bottom of article columns, similar to the Outbrains and Taboolas of the world?

Support Google AMP

WordPress actually has an example using Parse.ly of how to hook into their amp_post_template_analytics filter: https://github.com/Automattic/amp-wp/blob/master/readme.md#analytics

cc: @hbbtstar

More context from them:

"You could pretty easily integrate this into the existing Parsely plugin to make it even more seamless for both VIP and self-hosted users (warning: code is untested)":

add_action( 'pre_amp_render_post', 'parsely_amp_add_actions' );
function parsely_add_amp_actions() {
    add_filter( 'amp_post_template_analytics', 'parsely_amp_add_analytics' );
}

function parsely_amp_add_analytics( $analytics ) {
    global $parsely;
    $parsely_options = $parsely->get_options();

    if ( empty( $parsely_options['apikey'] ) ) {
        return $analytics;
    }

    $analytics['wp-parsely'] = array(
        'type' => 'parsely',
        'attributes' => array(),
        'config_data' => array(
            'vars' => array(
                'apikey' => $parsely_options['apikey'],
            )
        ),
    );

    return $analytics;
}

Provide support for users to whitelist specific post types

Currently, when implemented, the Parse.ly tracker is set for all post types in the publisher's database. A user has suggested that we allow users to whitelist custom post types.

As the user noted, "If you have a site with multiple post types, you probably only want analytics on one or two."

Investigate WP channels for sections

A Parse.ly customer asked if we could use "channels" for parsely-page sections. I'm currently unfamiliar with channels, but sounds like something we should investigate.

parsely-page values are not properly escaped

If a post has a the following tags: ['something', '"another thing"'], it'll be converted to:

{
  ...
  "tags": "&#34;another thing&#34;",
  ...
}

which Parse.ly crawlers read as "tags": ""another thing"" which is invalid JSON.

We should follow escaping instructions outlined here until we move to JSON-LD.

Check for wpcom_vip_get_term_by before using get_term_by

wpcom-vip_get_term_by is the cached version of get_term_by, though it's not part of the Wordpress core. We should make a new function to check for the existence of the former before falling back to the latter. That would look something like:

public function parsely_get_term_by(args) {
    if( function_exists('wpcom_vip_get_term_by') ) {
        wpcom_vip_get_term_by(args);
    } else {
       get_term_by(args);
    }
}

Lines to be changed:
https://github.com/Parsely/wp-parsely/blob/master/wp-parsely.php#L670
https://github.com/Parsely/wp-parsely/blob/master/wp-parsely.php#L672
https://github.com/Parsely/wp-parsely/blob/master/wp-parsely.php#L700
https://github.com/Parsely/wp-parsely/blob/master/wp-parsely.php#L707

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.