Twitter (via Zapier)

Our Zapier guide offers an overview of how to track Twitter and other applications and services in Watershed via Zapier. This guide is a much more detailed step by step walkthrough specific to Twitter with screenshots at every step of the way. 

This guide has five section:

About Watershed

Watershed LRS is the world's first open learning analytics platform that provides actionable insights from your training and performance data. Watershed collects data from a wide range of sources into one place. You can use Watershed's report cards to analyse this data, evaluate your learning programmes and measure the performance of your workforce.

About Zapier

Zapier is a cloud-based tool designed for connecting commonly used applications so that an event in one application triggers an action in another. For example, it can be used to post a Slack message whenever somebody registers for a GoToMeeting webinar. Zapier can also be used to track usage of these applications in Watershed. Every time a user favorites a Tweet or reports an issue in JIRA, it could be tracked in Watershed. Every time a programmer commits code or posts to Slack, that can be tracked too. Zapier offers a really quick way to get data out of a range of commonly used programs and into Watershed reports.

The aim of Zapier is to make integrating these applications as easy as possible. With a few clicks and settings you can have an integration (known as a Zap) set up in a few minutes. It’ll then run automatically in the background until you turn it off. Zapier has an impressive list of apps that it works with, and it’s possible to develop Zaps for products not on that list.

To use Zapier, you’ll need to register an account at https://zapier.com/sign-up/. The free plan allows you to track 100 tweets per month, which is fine for experimenting. You’ll need a paid account for real projects.  

About Twitter

Twitter is a social network that lets you publish 140-character messages, called "tweets", that can be seen by an international audience in real-time. Connect with your audience, express yourself and discover what's happening. You will need to have a Twitter account to complete this tutorial. You can sign up here: https://twitter.com/signup

You can track various Twitter events to Watershed LRS using Zapier. This guide focuses on tweets!

Connecting Zapier and Watershed

Once you have accounts on both Watershed and Twitter, you can get started using the Twitter to Watershed wizard here:

Follow these steps to work through the Wizard:

  1. Click Use this Zap.

  1. Connect your Twitter account. Either use an existing one you might already have set up in Zapier, or set up a new one. Zapier will track all tweets that user is able to see and which match the filter you’ll choose in the next step.

  1. Enter the #hashtag that you want to track Tweets about. This should include the # at the start. Remember: your Zapier pricing plan is based on the number of Tweets you track, so choose your hashtag wisely! Please also note that Zapier will only track future Tweets, not anything Tweeted before you set up the integration.

  1. Connect your Watershed LRS account. Either use an existing one you might already have set up in Zapier, or set up a new one. Let’s assume for this walkthrough that you don’t yet have a Watershed account set up

  1. Click the Connect button.

  1. Enter Watershed credentials.

In the window that pops up, enter your Watershed endpoint, key and secret. If you’re unsure where to find these, read the on-screen instructions carefully for direction.  

You’ll find the link to the ‘add an Activity Provider to Watershed’ guide especially useful. This is will automatically open in a new tab or window.

Once you’ve entered the credentials, click Yes, continue to test the connection.

  1. Enter the #hashtag that you want to track Tweets about again, this time without the #. Click Save + finish!

(Yes, we’re sorry that you have to enter this twice. Take care that the hashtag exactly matches the one used in step 3, except without the # at the start.)

Warning: don’t click the Insert Twitter fields or Show advanced options links unless you know what you’re doing (see xAPI Geek Explanation below).

xAPI Geek Explanation:  Why do I have to enter the hashtag twice?

Zapier works using a step by step process where it fetches data from one system, and then sends it on to another. The first time the hashtag is entered, this is used by Zapier when fetching tweets from Twitter to filter just those tweets including the hashtag. This second field is used by Zapier when building the xAPI statement to add a tag context activity representing the hashtag.

You can see the code for the context activity by clicking Show advanced options and scrolling down to the Context JSON field. The [[placeholder]] code is used to insert the hashtag you entered above. This peek behind the curtain should give you an taste of how a Zapier wizard like this could be created for @mentions, retweets, likes and other Twitter interactions, or indeed for other applications.

 

  1. Test Your Zap. Click the Test out my new Zap button.

  1. Tweet a tweet. Either wait for somebody to tweet using your chosen hashtag, or Tweet yourself. Then click Continue + fetch the tweet.

  1. Send the statement. Click Continue + send to Watershed LRS.

xAPI Geeks can click Show sample statement first to see what’s happening behind the scenes.

  1. Hooray! Your Zap is Working. You’re all done! Great job!

Reporting on Tweets

So, you’ve got your tweets in your LRS. How can we report on that data? First, let’s think about some of the questions you might want to ask:

  1. When are people tweeting about my hashtag?
  2. Who are the top tweeters for my hashtag?
  3. What topics and keywords are being used with my hashtag?

Of course, there’s lots more questions you could ask for the data, especially if you combine data about tweets with other learning and performance data about your tweeters. Let’s stick with these for now.

When are people tweeting about my hashtag?

Watershed’s line chart is a great way to report on changes in activity over time. Let’s create a simple chart that shows the number of tweets using your hashtag each day.

First we need to create a measure:

  1. Open Measures on the SETTINGS menu

  1. Click Add Measure to create a new measure

  1. Give your measure a name. This will automatically populate the Display Name field too.

  1. Add an Other filter for the statement property object.definition.type and the value http://id.tincanapi.com/activitytype/tweet.

  1. Add a second Other filter for the statement property context.contextActivities.parent.id and the value https://twitter.com/hashtag/<your hastag> where <your hashtag> is the text of your hashtag without the hash.

  1. Select the Statement property Value and enter the property id. We’re counting all xAPI statements that match the filter.

  1. Select the Count aggregation and leave the Benchmark (Optional) field blank.

  1. Choose Everyone for Visibility so that all users of Explore will be able to use this measure.

  1. Click Save changes to save changes to the measure.

The measure is now saved and can be used when creating cards.

Now that the measure is created, we can create a card that uses the measure:

  1. Open EXPLORE on the Watershed menu.

  1. Select the Line visualization.

  1. Enter a Card Title. Open the Card Text section and enter a Card Title.

  1. Open the Line section and remove any existing measures.

  1. Select the measure you created above then click Add measure.

  1. Save as new card. Click Save as new card to save the card, then return to your dashboard ready to create the next card.

Who are the top tweeters for my hashtag?

Watershed’s leaderboard is a great way to report on the top and bottom people or items for a particular measure. Let’s create a simple leaderboard that lists the people who tweeted your hashtag the most. We’ll use the line chart you just created as a starting point.

  1. Configure your card. On the line chart you just made, click the icon in the bottom right, then choose Configure.

This will open up Explore with the measure you created already set up. We can now edit the card to answer our current question.

  1. Change the card into a Leaderboard.

  1. Update the Card Title. Open the Card Text section and update the Card Title.

  1. Organize by person. In the Leaderboard section, set the card to be organized By person.

  1. Save as a new card. Click Save as new card to avoid overwriting the card you previously created.

What topics and keywords are being used with my hashtag?

Watershed’s bar chart is a great way to compare the usage of key terms and other hashtags in our tweets. We’ll create a simple barchart that compares the occurrence of a few key terms. Before you start, choose two or three key terms that you expect will appear in your filtered tweets and that you want to report on.

First, we’re need to create a new measure for each keyword we want to report on. Follow the steps below once per keyword.

  1. Open Measures on the SETTINGS menu

  1. Click Copy Measure to copy the measure you created earlier for all tweets.

  1. Edit your measure name. You’ll need to edit the Display Name too.

  1. Open the Advanced tab we’ll need to use a regex filter for this type of measure, which is not supported by the simple measure editor.

  1. Add the following JSON object to the equals filter:
{
  "fieldName": "object.definition.name.en",
  "values": {
    "regExp": true,
    "ids": [
      ".*\\#evaluation.*",
      ".*\\#Evaluation.*"
    ]
  }
},

Replacing ‘evaluation’ with the keyword that you want to search for. Take care to preserve the periods, stars and quotes in the JSON.

Please note: Regex filters are case sensitive and special characters such as hashes must be escaped with \\. 

  1. Click Save changes to save changes to the measure.

The measure is now saved and can be used when creating cards.

Now we can create the report card containing all of the measures we’ve created.

  1. Configure your card. On the ‘When are people tweeting about my hashtag?’ line chart, click the  icon in the bottom right, then choose Configure. This is exactly the same process as for the leaderboard you just created.
  1. Change the card into a bar chart.

  1. Update the Card Title. Open the Card Text section and update the Card Title.

  1. Select each of the measures you created and click Add measure for each.

  1. Save as a new card. Click Save as new card to avoid overwriting the card you previously created.

This will create a card that shows you the popularity of search terms on different days.

To take this further, you could try the same card organized by different dimensions and using different filters. You could also try using the new measures you created in your line chart and bar chart.

Experiment! Go wild!

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

If you can't find what you need or you want to ask a real person a question, please contact customer support.