Skip to content

mbaersch/array-item-cleaner-web

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Array Item Cleaner (Web GTM)

Custom Variable Template for Google Tag Manager

Cleanup for array items with RegEx

Template Status Repo Size License


Usage

  • define any array or JSON string as input for a string value cleanup in selected keys (only first level keys possible).

  • define at least one RegEx for searching text to replace and a replacement text (can be blank). Multiple lines are processed in the order of definition (which might be relevant in order to get the desired result).

  • specify at least one array key for a string field to process

The return value will be an array with all source information but "redacted" string values in all keys specified.

Examples

  • in order to replace characters like & (or & in HTML notation), use (&|&) as rule and a replacement like "and" or "+"
  • delete special characters or single or double quotes: (®|'|"|') , leave the replacement text blank

Releases

No releases published

Packages

No packages published

Languages