Find and replace text
You can search for, and optionally replace, strings or words in Analytics scripts.
- Click the location in the Script Editor where
you want to start searching the script.
To search the whole script click the left corner on the first line.
- Right-click and select Find.
- In the Replace dialog box, enter
the following information:
Find What – Specify the string or word to find.
Replace With – (Optional) If you want to replace the value you are searching for, specify the value to replace it with.
Match whole word only – Only return matches where the search value is an exact match for a word. For example, by default "int" would be found in "integer", but if this option is specified only "int" would be found and shorter or longer strings would be ignored.
Match case – Select this option to make the search case-sensitive. For example, by default searching for "Integer" would match "Integer" and "integer", but if this option is specified only "Integer" would be found.
- Complete one of the following tasks:
Click Find Next to locate the first, or next, instance of the search string. You can click this button repeatedly to move from one match to the next.
Click Replace to replace a currently highlighted match with the Replace With value.
Click Replace All to replace all matched values. Analytics displays a count of the number of occurrences that have been replaced.