Configuration
Sources
Introduction: Sources define where the data is coming from. Each Profiler will generally need to get the source data from somewhere. Sources allow you to gather that data. Common sources include metatags, cookies and url parameters.
Interface: Each source has its own fields which defines how it needs to be configured. Each Source will return an array of values which can then be used by Processors in the next step.
Definition: Source definitions ship with the Convivial Profiler Builder project.github morpht convivial profiler builder definitions source.yaml
Plugins
cookie
Fetches a value from cookies based on the source name and adds it to the values array if found.
get
Performs an asynchronous HTTP GET request to fetch data from a specified resource URL and adds the response to the values array.
httpuseragent
Determines the device type (mobile or desktop) from the user agent string and adds it to the values array.
meta
Collects content from <meta> tags matching a specified attribute name and adds each content piece to the values array.
query
Extracts values from URL query parameters matching the specified source parameter and adds them to the values array.
time
Adds the current time component (hour, minute, or second) specified in the source to the values array.
acceptlang
Adds the browser's language setting to the values array, or defaults to "en-AU" if the browser language is not set or does not include a region.
Processors
Processors take source data and does something with that data. In the simplest case the data can be copied into a store. In more advanced cases, the data may be transformed or used as an input into some function.
Definition: Source definitions ship with the Convivial Profiler Builder project.
github morpht convivial profiler builder definitions source.yaml
accumulation
Increments a value within an accumulator based on the input values.
dimension
Adjusts dimension values, optionally normalizing them across the input values.
extreme_geoip
Stores geographic information with an expiration time based on input values.
language_full
Stores the full language information from input values with an expiration time.
language_simple
Stores a simplified language code from input values with an expiration time.
map
Maps input values to stored values based on predefined mappings, with fallback and default values.
pageview
Logs page views and/or increments a counter based on the processor's configuration.
searchquery
Tracks search queries based on URL parameters, logging and incrementing counters for
unique searches.
store
Stores values with an expiration time, with support for permanent storage by setting a specific TTL.
unstore_value
Removes a stored value based on matching input values and temporarily stores a specified value.
temp
Stores values temporarily in the profiler's temporary storage.
Destinations
After the processing in a Profiler has been concluded, the data is generally published out to a destination such as local storage or possibly a cookie. This is the final step, where the user profile is defined by pulling across data from the storage area of the Convivial profiler.
Definition: Source definitions ship with the Convivial Profiler Builder project.
github morpht convivial profiler builder definitions source.yaml
bestpick
Selects the best value based on a set of criteria from local storage and optionally stores it in local storage or cookies.
copy
Copies a value identified by a storage key to either local storage or cookies, with an option to stringify the value.
flag
Stores a flag value in local storage or cookies, prefixed or suffixed as defined.
formfiller
Auto-fills form fields with data from local storage or cookies based on configurations.
formtracker
Attaches an event listener to a form to track submissions and push data to the dataLayer.
officehours
Determines if the current time falls within configured office hours and stores the result in local storage or cookies.
range
Categorises a numeric value into predefined ranges and stores the result in local storage or cookies.
season
Determines the current season based on a predefined value and stores it in local storage or cookies.
set
Sets a specified value in local storage or cookies to '1'.
threshold
Stores data in local storage or cookies if it exceeds a certain threshold.
top
Identifies and stores the top value from a dimension in local storage or cookies.
unset
Unsets a specified value in local storage or cookies by setting it to '0'.
datalayer_event
Pushes events to the dataLayer for analytics purposes, using the values parameter to create multiple events if necessary.
remove
Removes data from local storage or cookies based on a set of criteria.
Extending Convivial Profiler
Convivial Profiler has been built to be an extensible system making it possible to implement your own Source, Processor and Destination plugins. This allows you to extend the codebase as needed to suit your own needs.
Last updated