npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@goaffpro/affiliate-web-components

v0.0.7

Published

Web components to display affiliate information from goaffpro to the storefront

Downloads

165

Readme

Goaffpro affiliate web components

This library loads the necessary components to display affiliate information on your storefront or any other HTML page

Usage

  1. Load the library via CDN. Add the following script tag just above </body> OR </head> tag in your theme
<script type="module" src="https://unpkg.com/@goaffpro/affiliate-web-components@latest/dist/affiliate-web-components/affiliate-web-components.esm.js"></script> 
  1. Generate a public token to be used in the webcomponents. To generate the token, open Goaffpro merchant admin panel -> Settings page -> Advanced Settings tab -> Access tokens section. Click NEW API KEY to generate X-GOAFFPRO-PUBLIC-TOKEN. You will need to use the generated token in the next step

  2. Now you are ready to use the webcomponents. See below

Available Components


Affiliate Info component

This component allows you to display affiliate related information in your store when the customer uses the affiliate's link to enter the store.

<affiliate-info token="x-goaffpro-public-token" text="You are shopping with {{name}}"></affiliate-info>
Available attributes

| Attribute | Description | Mandatory| |----|---|---| | token | The x-goaffpro-public-token generated in Step 2 above | YES | text | The text to display on the page. A number of custom tags are available to customize the text. See list of available tags below | YES | | class | The CSS class to apply on text

| Tag | Description | Example |----|---|--- name | The name of the affiliate | {{name}} first_name | The name of the affiliate | {{first_name}} last_name | The name of the affiliate | {{last_name}} company_name | The name of the affiliate | {{company_name}} coupon | The coupon code given to the affiliate | {{coupon}}

Note: For Shopify's liquid files, please wrap the component in raw tag to ensure custom tags are preserved in generated HTML. eg.

{% raw %}
<affiliate-info token="x-goaffpro-public-token" text="You are shopping with {{name}}"></affiliate-info>
{% endraw %}

Affiliate selector component

This component allows you to display a list of affiliates for your customer to choose from when placing an order.

<affiliate-selector token="x-goaffpro-public-token"></affiliate-selector>
Available attributes

| Attribute | Description | Mandatory| Default |----|---|---| --- | | token | The x-goaffpro-public-token generated in Step 2 above | YES | | label | The affiliate property to show in the selector. See list of available properties below | NO | name | fallback | The fallback property to show in case the label is not set by the affiliate | NO | name | group_id | The group whose members are visible in the selector. Group ID is visible in the admin panel | No | class | The CSS class to apply on the select element | NO

Available properties

| Property | Description| |---|---| | name | The name of the affiliate | first_name | The first name of the affiliate | last_name | The last name of the affiliate | company_name | The company name of the affiliate


Affiliate photo component

This component allows you to display profile photo of the affiliate as an img tag

<affiliate-photo token="x-goaffpro-public-token"></affiliate-photo>
Available attributes

| Attribute | Description | Mandatory| Example | |----|----|----|----| | token | The x-goaffpro-public-token generated in Step 2 above | YES | | alt | The affiliate property to show in the selector. See list of available properties below | NO | Affiliate's photo | fallback_src | The affiliate property to show in the selector. See list of available properties below | NO | https://via.placeholder.com/100x100 | width | Set width of the image | NO | 100 | height | Set height of the image | No | 100 | class | The CSS class to apply on the select element | NO | | cover | Shorthand to set css object-fit property to cover | NO | Yes | rounded | Shorthand to set image as rounded | NO | Yes | | borderRadius | Shorthand to set border radius of the image | NO | 8