gatsby-plugin-proof
Version:
Gatsby plugin to add Proof to your site
22 lines (16 loc) • 617 B
JavaScript
var _react = require("react");
var _react2 = _interopRequireDefault(_react);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
exports.onRenderBody = function (_ref, _ref2) {
var setPostBodyComponents = _ref.setPostBodyComponents;
var pixelId = _ref2.pixelId;
if (typeof pixelId !== "string") {
console.error("Proof pixelId must be a string");
}
return setPostBodyComponents([_react2.default.createElement("script", {
async: true,
key: "gatsby-plugin-proof",
src: "https://cdn.useproof.com/proof.js?acc=" + pixelId
})]);
};
;