This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name Google Tag Manager improvements | |
| // @namespace https://tagmanager.google.com | |
| // @version 1 | |
| // @description Mostly makes GTM wider | |
| // @author twitter.com/pwm1991 | |
| // @match tagmanager.google.com | |
| // @grant none | |
| // ==/UserScript== |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Query a JS Function with Args in a Tag | |
| // Quote args even if not a string. | |
| {{ Variable }}("{{ Varible }}") | |
| // e.g.: | |
| {{function parseFloat x100}}("{{transactionTotal}}") | |
| // The variable needs to return a fn with the desired args: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Sub ExportCSV() | |
| ' | |
| ' ExportCSV Macro | |
| ' | |
| ' | |
| Range("A1").Select | |
| ChDir "\\rsnet.local\Users\UserData$\peterm\Downloads" | |
| ActiveWorkbook.SaveAs Filename:= _ | |
| "\\rsnet.local\Users\UserData$\peterm\Downloads\export.csv" _ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Sub AutoCorrect() | |
| ' | |
| ' AutoCorrect Macro | |
| ' | |
| ' | |
| Selection.Find.ClearFormatting | |
| Selection.Find.Replacement.ClearFormatting | |
| With Selection.Find | |
| .Text = " " | |
| .Replacement.Text = " " |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function() { | |
| var keywords = document.head.querySelector("meta[name='keywords']").content.toLowerCase(); | |
| var removalPhrases = | |
| [ | |
| "phrases to get rid of" | |
| ]; | |
| if (keywords.search != '') { | |
| for (i = 0; i < removalPhrases.length; i++) { | |
| phrase = removalPhrases[i]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Removes URL paramters that are either a) useless or b) store personal data. This is a giant game of whack a mole. | |
| function() { | |
| var params = ['name','fname','lname','first','last','firstname','lastName','lastname','first+name','last+name','your+name','email','emailaddress','email+address','work+email+address']; | |
| var a = document.createElement('a'); | |
| a.href = {{Page URL}}; | |
| if (a.search) { | |
| qps = '&' + a.search.replace('?', '') + '&'; | |
| for (i = 0; i < params.length; i++) { |