{"_id":"@blackbox-vision/gatsby-source-google-analytics-api-most-read-posts","_rev":"5-286b6901d113d0c428c5e360aab8647d","name":"@blackbox-vision/gatsby-source-google-analytics-api-most-read-posts","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"@blackbox-vision/gatsby-source-google-analytics-api-most-read-posts","version":"1.0.0","description":"Pull your most read posts from google analytics","main":"gatsby-node.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/BlackBoxVision/gatsby-source-analytics-most-read-posts.git"},"keywords":["gatsby","gatsby","plugin"],"author":{"name":"Jonatan E. Salas","email":"jonatan.salas@blackbox-vision.tech"},"license":"MIT","bugs":{"url":"https://github.com/BlackBoxVision/gatsby-source-analytics-most-read-posts/issues"},"homepage":"https://github.com/BlackBoxVision/gatsby-source-analytics-most-read-posts#readme","dependencies":{"googleapis":"^48.0.0"},"devDependencies":{"@commitlint/cli":"^8.3.5","@commitlint/config-conventional":"^8.3.4","husky":"^4.2.5","lint-staged":"^10.1.3","prettier":"^2.0.4"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS","pre-commit":"lint-staged"}},"lint-staged":{"*.{js,json,css,md}":["prettier --write","git add"],"*.{js,ts,tsx}":["git add"]},"gitHead":"46c77427d1aa66cc317b822bb02cdfff2ac93fb2","_id":"@blackbox-vision/gatsby-source-google-analytics-api-most-read-posts@1.0.0","_nodeVersion":"13.12.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-DsMTrBkWAWI9b1KXdfQwX7WZFkyMCeiEwemOFTedlvkzDaWqmfVYCKM7/uPZwdnaOsN0333SD4i9DJCyxZl2AA==","shasum":"9ad4c823dae161bd742337b38b636c90fc534234","tarball":"https://registry.npmjs.org/@blackbox-vision/gatsby-source-google-analytics-api-most-read-posts/-/gatsby-source-google-analytics-api-most-read-posts-1.0.0.tgz","fileCount":6,"unpackedSize":7077,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJel7R7CRA9TVsSAnZWagAAcBMP/1y/lR89hROqgjer4Csr\nN6dUcbKCYPnDh8/F/6/x8umr1JiA/aGq0uRYpTu+blVJSH/81zrStK4jjsFa\nuBiYIEeN/oyd/c5j04iSNQ7Oz6x26XkUoV60vPlyi0Ye1DsQJAsG/h3z4dZd\nN8rlb9vLeu6WE60jYRkJJFeIoya/x1JITntdQEcZe8OwTRB0f16QGLv13icI\nTHrwnUj5z0NjA0ufSMAakeS0qYx0Rg8adFwhOxwUo11RdUOPKFqo2mXGCWGp\n08lVx3sJI6dnRkzOViCZv4UgCSPCAMdCTEjItd++yhQFV7Q7uS7Vhg4+Z6Ve\nFEkyONWggv8vHEn5/6JEg7LLJwF+TpgSGyuKYEIEQqu+OT3WlvjkJlDByWwa\nSA8gwlgEF45L4oQOIG4l2Sn1uDmQxq8/g04jsolcU3idjgooPqRp1gaGOGr0\ngcky7/jwdN28XCD2qt0FDCx1ewBwo5JeE5jOtHcOCqd/h2qD1L9Qpua+QUPw\neCCB+P07Wso3vVxS5yYwPesL++M0hkniKkbg1ka39UW5uGmz9pVS1U5p29P8\nlttv89ZDaqKrRXlE35ohbIwI1tA4J0iOlGDjk+ZsR9wEixKvPzyDWgA2JFfW\nU2ugsBevdRSDC0fT7x2M1xrpBNiYYyaqZGE6Qto2ImZU0RKvroU84BMpwcp5\nxOmc\r\n=nj8U\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICpj3EEhbsnq+gVSrs07hDjOeqIRUEIzFEwaEDlJeWQYAiBlcHSFpwCktxCoXEb5ZLap/F8xz43slnyCqSFGeqIMmQ=="}]},"maintainers":[{"name":"manutuero","email":"manuel.tuero@blackbox-vision.tech"},{"name":"jonatansalas","email":"jonatan.salas@blackbox-vision.tech"}],"_npmUser":{"name":"jonatansalas","email":"jonatan.salas@blackbox-vision.tech"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/gatsby-source-google-analytics-api-most-read-posts_1.0.0_1587000442728_0.5329484119263057"},"_hasShrinkwrap":false},"1.0.1":{"name":"@blackbox-vision/gatsby-source-google-analytics-api-most-read-posts","version":"1.0.1","description":"Pull your most read posts from google analytics","main":"gatsby-node.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/BlackBoxVision/gatsby-source-analytics-most-read-posts.git"},"keywords":["gatsby","gatsby-plugin","gatsby-source-plugin","gatsby-source-google-analytics-api-most-read-posts","google-analytics"],"author":{"name":"Jonatan E. Salas","email":"jonatan.salas@blackbox-vision.tech"},"license":"MIT","bugs":{"url":"https://github.com/BlackBoxVision/gatsby-source-analytics-most-read-posts/issues"},"homepage":"https://github.com/BlackBoxVision/gatsby-source-analytics-most-read-posts#readme","dependencies":{"googleapis":"^48.0.0"},"devDependencies":{"@commitlint/cli":"^8.3.5","@commitlint/config-conventional":"^8.3.4","husky":"^4.2.5","lint-staged":"^10.1.3","prettier":"^2.0.4"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS","pre-commit":"lint-staged"}},"lint-staged":{"*.{js,json,css,md}":["prettier --write","git add"],"*.{js,ts,tsx}":["git add"]},"gitHead":"945f0cb3191576a7190d5e0980aaf49161f3cfed","_id":"@blackbox-vision/gatsby-source-google-analytics-api-most-read-posts@1.0.1","_nodeVersion":"13.12.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-a/RxJIoQpSBMsKJusaqG7x0tgxKKlSqjNeGqWAKQvfpNtVHoxjNsdOKBHESpEeGhCNlFUDEgEDHe6nwaotkKLQ==","shasum":"cfe28bcbb16ee5afdc372f0a03eee6e3ed234e73","tarball":"https://registry.npmjs.org/@blackbox-vision/gatsby-source-google-analytics-api-most-read-posts/-/gatsby-source-google-analytics-api-most-read-posts-1.0.1.tgz","fileCount":6,"unpackedSize":7715,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh2BipCRA9TVsSAnZWagAAgX0P/R6Lf2sf276b0pmT9/6V\nnw+tgYgS6ZZbt7T2uu4+VfcMq5G5VU1yqlAoiio8tHxwLuwzaD2Yd+b12I9x\nWEl0QgKwcx/ITuQco1o5eWT7F+iPsvwes0hn0CrT3n8YGfIY/1sxWFjxyNr7\nJh+Rx91LpFrHSWAnrJ3CfUOUVp+SQHMxfzfSJ/BX1jSXxIp62PNwhpMLmxVO\nJn1TX8MntiEHiVoj1es1TBseMQnRX4iem8g71f9Zc/MEZwEyppSNcjZ+MSS2\n4aLSz0qbqQxIEc8Gud3MoyZ43sKzI+rQNizoVSEDFoOAhU4weZ+8mBT0xVi0\nvlce5d+qwxng0MXB5Ik0ilUPmz8pzmadEj9q5c0lIXAmkoFu5WF6InXp4W8t\nHqNB8LYn6mCKRD0Gnl3Czf5qbuEdU/vptoX2cLu0FYS38b0d8VOD6fINWHIl\njo1hqisImM8076cwpT2MaGDMzRcbe64nJIq26c72zfKe/VAeDPqQ3gSDszUs\nlRyRXYvSmmvtwWfYjmzLYb01jaeV7THP8H3EpTQEvGuI7RdRGfy2I32VoG72\ncFlQ/2WfQKq9SsO4jZQHXt5Q1ALg0516GqqU67+AwpAHF8xlsHKvcOtaqMs2\nZFSc7VewsVJ7ko1k/hvULvymYtIUGGTG20IqRUXzGs7p3Qvfu538U4oJjnbO\nJj4G\r\n=QWFe\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCywoLs5fF4pggrpfuQJT7m8tH67S4d0s3gh2PcvBhf6gIhAN2Ie8g54/QeTUA9h9YAX9JDrmPQrz8W0/bVeFoB2ARc"}]},"maintainers":[{"name":"jonatansalas","email":"jonatan.salas@blackbox-vision.tech"},{"name":"manutuero","email":"manuel.tuero@blackbox-vision.tech"}],"_npmUser":{"name":"jonatansalas","email":"jonatan.salas@blackbox-vision.tech"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/gatsby-source-google-analytics-api-most-read-posts_1.0.1_1587048662333_0.979424096080852"},"_hasShrinkwrap":false}},"time":{"created":"2020-04-16T01:27:22.430Z","1.0.0":"2020-04-16T01:27:22.934Z","modified":"2022-04-04T19:19:49.120Z","1.0.1":"2020-04-16T14:51:02.470Z"},"maintainers":[{"email":"jonatan.salas@blackbox-vision.tech","name":"jonatansalas"},{"email":"manuel.tuero@blackbox-vision.tech","name":"manutuero"}],"description":"Pull your most read posts from google analytics","homepage":"https://github.com/BlackBoxVision/gatsby-source-analytics-most-read-posts#readme","keywords":["gatsby","gatsby-plugin","gatsby-source-plugin","gatsby-source-google-analytics-api-most-read-posts","google-analytics"],"repository":{"type":"git","url":"git+https://github.com/BlackBoxVision/gatsby-source-analytics-most-read-posts.git"},"author":{"name":"Jonatan E. Salas","email":"jonatan.salas@blackbox-vision.tech"},"bugs":{"url":"https://github.com/BlackBoxVision/gatsby-source-analytics-most-read-posts/issues"},"license":"MIT","readme":"# Gatsby Source for Most Read Posts from Google Analytics [![npm version](https://badge.fury.io/js/%40blackbox-vision%2Fgatsby-source-google-analytics-api-most-read-posts.svg)](https://badge.fury.io/js/%40blackbox-vision%2Fgatsby-source-google-analytics-api-most-read-posts) [![License: MIT](https://img.shields.io/badge/License-MIT-brightgreen.svg)](https://opensource.org/licenses/MIT) [![Known Vulnerabilities](https://snyk.io/test/github/blackboxvision/gatsby-source-analytics-most-read-posts/badge.svg)](https://snyk.io/test/github/blackboxvision/gatsby-source-analytics-most-read-posts)\n\nGet your most read Posts from Google Analytics Reporting API.\n\n## Install\n\nYou can install this library via NPM or YARN.\n\n### NPM\n\n```bash\nnpm i @blackbox-vision/gatsby-source-google-analytics-api-most-read-posts\n```\n\n### YARN\n\n```bash\nyarn add @blackbox-vision/gatsby-source-google-analytics-api-most-read-posts\n```\n\n## Config\n\nIn your `gatsby-config.js`:\n\n```javascript\n{\n    resolve: `@blackbox-vision/gatsby-source-google-analytics-api-most-read-posts`,\n    options: {\n        viewId: `115350264`,\n        email: `example@domain.com`,\n        secretKey: `yourSecretAPIKey`,\n        maxResults: 10,\n        filters: 'ga:pagePath!@/tag/;ga:pagePath!@/page/;ga:pagePath!=/;ga:pageTitle!=(not set);ga:pagePath!@&',\n        dates: {\n            from: 'today',\n            to: '2019-01-01'\n        }\n    }\n}\n```\n\n## Supported Options\n\n| Properties | Types  | Default Value | Description                                                      |\n| ---------- | ------ | ------------- | ---------------------------------------------------------------- |\n| viewId     | string | none          | Your viewId for your Google Analytics property.                  |\n| email      | string | none          | The email generated from the Google API Console.                 |\n| secretKey  | string | none          | The PEM certificate generated from the Google API Console.       |\n| maxResults | number | 3             | Total results to get from the source.                            |\n| filters    | string | ''            | Filters for data from Google Analytics.                          |\n| dates.from | string | 'today'       | A date formatted string or an string representing time relation. |\n| dates.to   | string | '2019-01-01'  | A date formatted string or an string representing time relation. |\n\n## Example Usage\n\n```javascript\nimport React from 'react';\nimport { StaticQuery, graphql } from 'gatsby';\n\nconst gplQuery = graphql`\n  query GetAllMostReadPosts {\n    allMostReadPosts {\n      nodes {\n        totalViews\n        title\n        url\n      }\n    }\n  }\n`;\n\nexport const MostReadPosts = () => (\n  <StaticQuery\n    query={gplQuery}\n    render={({ allMostReadPosts: { nodes: posts } }) =>\n      posts.map((post, idx) => (\n        <div key={idx}>\n          <a href={post.url}>\n            <h2>{post.title}</h2>\n          </a>\n        </div>\n      ))\n    }\n  />\n);\n\nMostReadPosts.displayName = 'MostReadPosts';\n```\n\n## Issues\n\nPlease, open an [issue](https://github.com/BlackBoxVision/gatsby-source-analytics-most-read-posts/issues) following one of the issues templates. We will do our best to fix them.\n\n## Contributing\n\nIf you want to contribute to this project see [contributing](https://github.com/BlackBoxVision/gatsby-source-analytics-most-read-posts/blob/master/CONTRIBUTING.md) for more information.\n\n## License\n\nDistributed under the **MIT license**. See [LICENSE](https://github.com/BlackBoxVision/gatsby-source-analytics-most-read-posts/blob/master/LICENSE) for more information.\n","readmeFilename":"README.md"}