GithubHelp home page GithubHelp logo

newrelic-experimental / newrelic-browser-for-salesforce-commerce-cloud Goto Github PK

View Code? Open in Web Editor NEW
2.0 9.0 1.0 35 KB

Cartridge to simplify adding New Relic Browser Javascript to your SalesForce Commerce Cloud site

License: Apache License 2.0

JavaScript 100.00%
nrlabs salesforce-commerce-cloud nrlabs-odp

newrelic-browser-for-salesforce-commerce-cloud's Introduction

New Relic Experimental header

New Relic Browser for SalesForce Commerce Cloud

A plugin to SalesForce Commerce Cloud (aka SFCC aka Demandware) that adds the New Relic Browser Javascript snippet to the header of every SFCC Site page.

Local Installation

  1. Clone this repository
  2. Install the project's dependencies by running npm install in the repository root folder.

Configuration

  1. Edit package.json, modify paths.base property to point to your local app_storefront_base cartridge.
  2. Open the New Relic Browser UI and click the (+) Add More button in the top-right corner.
    • If you have access to multiple acccounts, be sure to choose the account you want to deploy to from the pull-down menu.
  3. In the "Get started with New Relic Browser" page, choose the following:
    • Deployment Method: Copy/Paste Javascript code method.
    • Instrumentation: 'Pro' (recommended) or 'Lite' Instrumentation.
      • SFCC sites are not Single-Page Apps (as of the writing of this README), so using 'Pro + SPA' will cause the wrong dashboards to appear in the UI.
    • Name your app: choose "No. (Name your standalone app)" and name it however you like.
      • Do not associate it with an existing APM application, as this will have unintended consequences in the UI!
  4. Replace the contents of cartridges/plugin_newrelic_browser/cartridge/client/default/js/nr-agent.js with your Copy/Paste snippet.
    • You MUST comment-out or delete the <script type="text/javascript"> and </script> HTML tags from your snippet.
    • The portion you do want to preserve starts with: window.NREUM||(NREUM={})...
  5. Run npm run compile:js in the repository root folder to create client-side assets.
    • These are found in cartridges/plugin_newrelic_browser/cartridge/state.
  6. Configure dw.json with your Business Manager or API client credentials and your Site version.
    • There are examples of dw.json packaged with this plugin for both authentication types.

Deployment & Verification

  1. Upload the plugin by running npm run uploadCartridge in the repository root folder.
  2. In SFCC Business Manager, add plugin_newrelic_browser to your site's cartridge path (Administration -> Sites -> Manage Sites -> <Your_site> -> Settings)
  3. Once deployed, you can use New Relic Browser as usual, your application will appear like any other.

Notes

  • Make sure your site is receiving browser traffic before checking for data.
  • uBlock Origin or similar filters can break the page load once the Browser JS snippet has been added.

Support

New Relic has open-sourced this project. This project is provided AS-IS WITHOUT WARRANTY OR DEDICATED SUPPORT. Issues and contributions should be reported to the project here on GitHub. We encourage you to bring your experiences and questions to the Explorers Hub where our community members collaborate on solutions and new ideas.

Contributing

We encourage your contributions to improve Salesforce Commerce Cloud for New Relic Browser! Keep in mind when you submit your pull request, you'll need to sign the CLA via the click-through using CLA-Assistant. You only have to sign the CLA one time per project. If you have any questions, or to execute our corporate CLA, required if your contribution is on behalf of a company, please drop us an email at [email protected].

A note about vulnerabilities

As noted in our security policy, New Relic is committed to the privacy and security of our customers and their data. We believe that providing coordinated disclosure by security researchers and engaging with the security community are important means to achieve our security goals.

If you believe you have found a security vulnerability in this project or any of New Relic's products or websites, we welcome and greatly appreciate you reporting it to New Relic through HackerOne.

License

Salesforce Commerce Cloud for New Relic Browser is licensed under the Apache 2.0 License.

Salesforce Commerce Cloud for New Relic Browser also uses source code from third-party libraries. You can find full details on which libraries are used and the terms under which they are licensed in the third-party notices document.

newrelic-browser-for-salesforce-commerce-cloud's People

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

newrelic-browser-for-salesforce-commerce-cloud's Issues

[Repolinter] Open Source Policy Issues

Repolinter Report

๐Ÿค–This issue was automatically generated by repolinter-action, developed by the Open Source and Developer Advocacy team at New Relic. This issue will be automatically updated or closed when changes are pushed. If you have any problems with this tool, please feel free to open a GitHub issue or give us a ping in #help-opensource.

This Repolinter run generated the following results:

โ— Error โŒ Fail โš ๏ธ Warn โœ… Pass Ignored Total
0 1 0 5 0 6

Fail #

โŒ readme-contains-link-to-security-policy #

Doesn't contain a link to the security policy for this repository (README.md). New Relic recommends putting a link to the open source security policy for your project (https://github.com/newrelic/<repo-name>/security/policy or ../../security/policy) in the README. For an example of this, please see the "a note about vulnerabilities" section of the Open By Default repository. For more information please visit https://nerdlife.datanerd.us/new-relic/security-guidelines-for-publishing-source-code.

Passed #

Click to see rules

โœ… license-file-exists #

Found file (LICENSE). New Relic requires that all open source projects have an associated license contained within the project. This license must be permissive (e.g. non-viral or copyleft), and we recommend Apache 2.0 for most use cases. For more information please visit https://docs.google.com/document/d/1vML4aY_czsY0URu2yiP3xLAKYufNrKsc7o4kjuegpDw/edit.

โœ… readme-file-exists #

Found file (README.md). New Relic requires a README file in all projects. This README should give a general overview of the project, and should point to additional resources (security, contributing, etc.) where developers and users can learn further. For more information please visit https://github.com/newrelic/open-source-tools/tree/master/nerdpacks/oss-template.

โœ… readme-starts-with-experimental-header #

The first 5 lines contain all of the requested patterns. (README.md). The README of an experimental project should have an experimental header at the start of the README. If you already have an experimental header and this rule is failing, your header may be out of date, and you should update your header with the suggested one below. For more information please visit https://opensource.newrelic.com/oss-category/.

โœ… code-of-conduct-file-does-not-exist #

New Relic has moved the CODE_OF_CONDUCT file to a centralized location where it is referenced automatically by every repository in the New Relic organization. Because of this change, any other CODE_OF_CONDUCT file in a repository is now redundant and should be removed. For more information please visit https://docs.google.com/document/d/1y644Pwi82kasNP5VPVjDV8rsmkBKclQVHFkz8pwRUtE/view. Did not find a file matching the specified patterns. All files passed this test.

โœ… third-party-notices-file-exists #

Found file (THIRD_PARTY_NOTICES.md). A THIRD_PARTY_NOTICES.md file can be present in your repository to grant attribution to all dependencies being used by this project. This document is necessary if you are using third-party source code in your project, with the exception of code referenced outside the project's compiled/bundled binary (ex. some Java projects require modules to be pre-installed in the classpath, outside the project binary and therefore outside the scope of the THIRD_PARTY_NOTICES). Please review your project's dependencies and create a THIRD_PARTY_NOTICES.md file if necessary. For JavaScript projects, you can generate this file using the oss-cli. For more information please visit https://docs.google.com/document/d/1y644Pwi82kasNP5VPVjDV8rsmkBKclQVHFkz8pwRUtE/view.

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.