Luden
GuinsooLabGitHub
  • Welcome to Luden!
  • Quickstart
    • Deploying with Docker
    • Building from Source
    • Scaling Luden Server
  • Configuration
    • Configuration
    • Authorization
    • Destinations Conf
      • Snowflake
      • AWS S3
      • AWS RedShift
      • Postgres
      • Google BigQuery
      • MySQL
      • Clickhouse
      • Guinsoo
      • WebHook
    • Sources Conf
      • Synchronization Scheduling
      • Airbyte Based Sources
    • Sources Catelog
  • Features
    • JavaScript Transform
    • Destination Tags
    • Data Warehouses
    • Match Mode
    • Stream Mode
    • DBT Cloud Integration
    • Event Cache
    • Geo Data Resolution
    • Typecast
    • Admin Endpoint
    • Application Metrics
  • Sending Data
    • JS SDK
    • Node.js
    • Event API
    • Bulk API
    • Segment API
  • Extending
    • Destination Extensions
    • Source Extensions
    • API Specs
    • Luden Architecture
  • Appendix
    • Contribute
    • FAQs
Powered by GitBook
On this page
  • How it works
  • Configuration
  • Filtering
  1. Features

Destination Tags

Destination Tag is a type of destination that installs configured HTML/Javascript tag to the website page on receiving an event from Javascript SDK.

The required version of Jitsu Server >= 1.41.0 The required version of Javascript SDK >= 2.5.0

How it works

You need to provide HTML/Javascript code of your tag and link the destination to an API key.

When Javascript SDK sends an event to the Luden Server, and a Destination Tag is linked to the API key, Luden Server synchronously processes HTML/Javascript code template and returns the resulting code block to the Javascript SDK.

Javascript SDK parses code block:

  • All <script> tags from the code will be appended to the <head> block of you website and javascript code will be executed by browser.

  • Other html tags will be appended to the end of <body> of you website.

Configuration

Example:

destinations:
  my_tag:
    only_tokens:
      - abc.123
    type: tag
    config:
      filter: $.event_type == "pageview"
      tagid: "tag123"
      template: |-
        <script>
        console.log("Hello {{ .user.id }} from Luden!")
        </script>

Filtering

You can use JavaScript expressions to filter events so tags will be triggered for certain events only. Here are few example fo such JavaScript expressions for typical cases:

Only for "pageview" events:

$.event_type == "pageview"

For "pageview" or "conversions" events:

$.event_type == "pageview" || $.event_type == "conversions"

For authorized users only:

$.user.email
PreviousJavaScript TransformNextData Warehouses

Last updated 2 years ago