Collecting Meta Tags
  • 06 May 2020
  • 1 Minute to read
  • Contributors
  • Dark
    Light
  • PDF

Collecting Meta Tags

  • Dark
    Light
  • PDF

Article summary

Collecting Meta Tags

The custom meta tag field causes the tag to scan all meta tags on the page, looking for names that match those specified in the metanames field. Webtrends automatically passes along any meta names and values beginning with WT., DCSext. and DCS..

Default Value: None

Example:

Suppose you have a page with the following meta tags that you wish to collect as custom parameters:

<meta name="fruit1" content="apple">
<meta name="fruit2" content="orange">
<meta name="fruit3" content="banana">

You would use the following JavaScript tag configuration:

window.webtrendsAsyncInit = function () {
        var dcs = new Webtrends.dcs();
        dcs.init( {
                dcsid: "dcs9x99xxxx9xxx9xx9xxxx9x_9x9x",
                metanames: "fruit1,fruit2,fruit3"
        });
        dcs.track();
}

Which generates the following custom query parameters:

meta_fruit1=apple&meta_fruit2=orange&meta_fruit3=banana


Was this article helpful?