January 2016

Jan 24
example-form

Let’s say I have the Formstack Form below and really want to capture the data of “Amount of Expense” and the User ID that is auto assigned to each submission, in Google Analytics. How would you go about that?

formstack

Set Up On Formstack

  • Within Formstack, navigate to the form > Settings > Emails & Redirects > Confirmation Emails > “Click to Add One” > Content: Custom Message. (You won’t be composing a message, just getting a few variables out of Formstack.)
  • Within the body, select the Unique ID & whatever field have the monetary (value) amount you’d like to capture. Remember that you cannot put personally identifiable data in Google Analytics, so don’t try to capture email, last name, etc. in Google Analytics.
  • Take note of the user ID tag and the tag associated with the expense amount.
  • Press cancel without saving, once you’ve copied that information.

formstack-email-ids

  • Once that screen is closed, navigate to “After the Form is Submitted” within the same page.
  • Select “Redirect to an External URL”, and insert your thank you page URL.
  • Immediately after, add a question mark (?) for a query. Within that query add the user ID tag.
  • Following that tag, add a hash symbol (#) followed by the tag for the expense, as you see below: www.example.com/thankyou.php?{$_submission_id}#{$37021767}.
  • This results in your thank you page having the data passed in the URL so that Google Analytics can parse it.submit-action-form

Set Up Google Analytics

  • Ensure that you have Google Analytics installed on the page the form is embedded and the form’s thank you page.
  • Next, add this script to your thank you page. It will pull the parsed information into Google Analytics as an event submission.

Results

Now the data will go into Google Analytics on each submission.

You’ll also be able to compare the Event Label within Formstack, under Submissions to match it up to the Personal Identification Information:
formstack-submissions

More Information

This tactic can also be use by taking advantage of Google’s Custom Dimensions and Metrics with Google Tag Manager.

Jan 24
time

At work one day, I had a client request a website change at 6PM and I wouldn’t be near a computer to make the simple text change. Since we don’t have a content management system, it was up to me to devise a solution.

So to trigger the change, I used a little bit of jQuery. This basic script just says, if the month is 11 (December) and the date is less than or equal to the 22nd, then any element with the class “remove” will show and any element with the class “show” will be hidden. When the date becomes December 13, then any element with the class”remove” will be hidden and any element with the class “show” will be visible.

With this quick script I can specify the minute, hour, day, month and/or year that I’d like certain elements to show by assigning them a CSS class of remove or show. The time is based on your server’s time.

More Info

• More about JavaScript Operators
• More about JavaScript Date Referencing
Stack Overflow Question That Inspired The Post

Jan 23
no-data-recieved-error

I use GoDaddy as my hosting and obviously have a WordPress install. A few months ago, I started running into this error on Google Chrome: “No data received [ERR_EMPTY_RESPONSE] Unable to load the webpage because the server sent no data.” I got a similar message in Firefox: “The connection to the server was reset while the page was loading.” This happened whenever I tried to make a new post and really put a damper on my blog activities on my various blogs.

I searched numerous forums, checked out my GoDaddy CPanel, looked at my FTP files, uninstalled & deactivated plugins, and made sure WordPress & plugins were all up to date. Still nothing worked! I did discover that the error could be triggered when editing files, as well though.

Becoming frustrated, I checked line-by-line of a draft to see what triggered the error, and I discovered it. The error occurred anytime a post had links with “http:” & “https:”.

(Temporary) Solution

Obviously removing the protocol declaration from links (and images) in a blog post could be problematic if I needed to link externally but thankfully, you don’t need to declare a protocol to make links. You can instead point to a website like this: //www.google.com instead of http:||google.com (slashes would be here instead of pipes obviously).

With any post I now make, I just make sure my links use protocol-relative URLs instead of declaring the protocol and I no longer receive errors. Unfortunately, I have yet to discover the root cause of the problem, but for the time being, it allows me to blog again while I figure it out.

Jan 23
linkedin-recommendations-me

The other day, I realized that I didn’t have any LinkedIn recommendations, and being in consulting work, I needed some social proof. So my first thought was to use the built-in recommendation form provided by LinkedIn:

linkedin-recommendation

But then I thought, how many people actually read emails that come in from LinkedIn. What were the chances that the request would go unseen, thus unanswered? So I thought there must be a way to just send someone a direct link to recommend me via email.

How to Get A Direct Link to be Recommended (Prior to 2017):

  1. View Your Own LinkedIn Profile
  2. Scroll to the Bottom where your Recommendation Area Is
  3. Under, “Would you like to recommend?”, right click and get the URL of the link: “Recommend YOURNAME”.
  4. The URL is structured something like this: www.linkedin.com/recs/give?memberId=00000000
  5. Use that URL to construct an email to your desired recommended (make sure you’re connected to them on LinkedIn).

This is where the URL links to (once they sign in):

linkedin-recommend-me

 

How to Get A Direct Link to be Recommended (2017):

  1. Use the URL: https://www.linkedin.com/in/YOURUSERNAME/recommendation/write/
  2. It will take the user to a page that looks like this that prompts for relationship & position then asks for your recommendation:

    LinkedIn Recommendations

Thanks, Ethan Anderson for letting me know about the update!

How To Ask For A LinkedIn Recommendation

I could write something up about that but there is a lot of great articles already about it, so here are two I recommend:

 

Stay Updated