Goals and Signals
Configure goals and signals for your customers to reach.
Configuration of goals and signals happens through the config event type. In this guide, you will learn how to design your goals and signals, and how to send those through to your Valued project.
Valued provides two ways to configure goals and signals: GitHub Actions or one of the SDKs. GitHub Actions is the recommended way.
Github Actions
In the following example, we are point of sale SaaS company and we are creating two goals for our customers:
- Customer making their first widget sale
- Customer receiving 6 payments
And, a signal to check if sales drop have dropped by 10% or more in the last 28 days in comparison to the previous.
Single configuration file
You can create a single configuration file called valued.yaml
or .valued.yaml
either at the top level, or inside a directory called config
or .config
.
Valued’s configuration file supports .json
, .toml
, .yml
and .yaml
formats.
Example
.config/valued.yaml
Multiple files
You can also create individual configuration files for goals and signals.
Create a valued
, .valued
, config/valued
, or .config/valued
directory, and add one goals.toml
and one signals.toml
file.
Example
.valued/goals.toml
.valued/signals.toml
Set up the GitHub Action
-
Obtain a token for the Valued API. In the Valued Dashboard, click Integrations and copy “API Key”. Store it in the
VALUED_API_KEY
secret. -
Add the following step to your GitHub Action workflow:
A full workflow only pushing the configuration might look like this: