Quick tips for sending and sharing JavaScript tracking code

  • Don't copy and paste the code into the body of an email
  • Don't copy and paste the code into a Word, Excel or other rich media document
  • Do get yourself a free, easy to use code editor and use that to copy / paste code then send NEXD the .txt or .js file.

When sending 3rd-party tracking scripts with NEXD, it's important that you or your team does so in a way that ensures when the NEXD engineer receives the file, the code contained within it works correctly.

If, for example, you have a piece of JavaScript code, copying and pasting that code into Skype or and Excel document will, most likely, result in that code being reformatted incorrectly.

So, what's the best way to send the code to NEXD?

Well, luckily there are a few, very simple, free options, depending on what files you have and what operating system you're using.

  • If you have already a .js file, you can just go ahead and send us that. This is the best thing for NEXD's engineers to get their eyes on, because it removes the risk of formatting or copy-paste errors. It's important to note though, that many email platforms and apps (I'm looking at you, Inbox by Google) won't allow you to send .js files because they interpret them as malicious code.
  • If you have a file, but can't email it, change the file extension to .txt and then try attaching and sending that. This should allow the file to bypass and file type restrictions enabled within your email app.
  • If you don't have a file, just some code inside another platform create a new text file, save it and send it. It's important to point out though DO NOT PASTE THIS CODE INTO MICROSOFT WORD, EXCEL OR YOUR EMAIL APP. All of these platforms feature some kind of rich text editing and, as result, will swap out characters that are needed for the code to work properly. Excel, in particular, is a big no-no because it looks at certain characters and converts them into functions, which really, really breaks things.

The good news is it's really easy to get this data into a simple text file that you can send to us.

Windows users can use Notepad to create a new plaintext file (it's important not to save it as rich text, as this will result in damaged code). Mac users can use TextEdit, but that defaults to rich text, so I would suggest using SublimeText or Brackets (both are free).

In fact, I myself use SublimeText. It looks good, works wonderfully and plays nice on both Mac and Windows.

As always, if you're having trouble getting any of this to work, you can reach out to us via Live Chat or send an email to [email protected] and we'll be delighted to help you.

Did this answer your question?