# Looker

<p><a href="https://looker.com/" >Looker</a> is a popular Business Intelligence and data analytics platform. It allows you to explore your data for actionable, business-oriented insights.</p>
<p>You can now use Looker as a data source to send enriched user activities and their associated properties over a period of time to RudderStack. RudderStack then forwards this data to your specified destinations for real-time syncing of the newly created properties and actions.</p>
<!-- end-chunk -->
<!-- begin-chunk -->
<h2 id="set-up-looker-actions">Set up Looker actions</h2><p>After creating your views in Looker, you need to set-up the necessary <a href="https://docs.looker.com/admin-options/platform/actions" >Looker actions</a>. To do so, go to your Looker actions dashboard.</p>
<p>Note that:</p>
<ul>
<li>While RudderStack supports teams and individual workspaces in its <a href="https://rudderstack.com/pricing/" >Enterprise edition</a>, Looker does not allow individual Action Hub configurations for different members of the same organization.</li>
<li>To send the output of different looks to various RudderStack sources, you will need to host custom instances of Looker Action Hub. See the <a href="https://docs.looker.com/sharing-and-publishing/action-hub#setting_up_a_local_action_hub_server" >Looker documentation</a> for more information.</li>
</ul>
<!-- end-chunk -->
<!-- begin-chunk -->
<h2 id="configure-looker-source-in-rudderstack">Configure Looker source in RudderStack</h2><ol>
<li>Go to your <a href="https://app.rudderstack.com/" >RudderStack dashboard</a> and click <strong>Add Source</strong>. From the list of <strong>Event Streams</strong> sources, select <strong>Looker</strong>.</li>
<li>Assign a name to your source and click <strong>Continue</strong>.</li>
<li>Your Looker source is now configured. Note the source <strong>Write key</strong>:</li>
</ol>

<figure class="image--main "  >
    <a 
         href="/docs/images/event-stream-sources/looker-write-key.webp"
        
        >
        <img src="/docs/images/event-stream-sources/looker-write-key.webp" 
         alt="Looker source write key"  
         
         
        decoding="async" loading="lazy" class="img-shortcode"/>
    </a>
    
</figure>

<!-- end-chunk -->
<!-- begin-chunk -->
<h2 id="add-rudderstack-action-hub-server">Add RudderStack Action Hub Server</h2><p>This section describes the steps required to enable <a href="https://github.com/rudderlabs/actions" >RudderStack Actions</a> in Looker.</p>
<p>RudderStack hosts a Looker <a href="https://docs.looker.com/sharing-and-publishing/action-hub#writing_an_action" >Action Hub Server</a> that communicates with your Looker instance.</p>
<p>To connect the Action Hub Server to your Looker instance, click the <strong>Add Action Hub</strong> button present at the bottom of Looker Actions dashboard:</p>

<figure class="image--main "  >
    <a 
         href="/docs/images/event-stream-sources/add-action-hub.webp"
        
        >
        <img src="/docs/images/event-stream-sources/add-action-hub.webp" 
         alt="Add Action Hub"  
         
         
        decoding="async" loading="lazy" class="img-shortcode"/>
    </a>
    
</figure>

<p>Depending on your region, enter the RudderStack Action Hub Server URL and related authorization token:</p>
<div class="rs-tabs">
	<div class="rs-tabs__list">
		<button type="button" class="rs-tabs__tab"
			id="tab-acedbf"
		
		>US</button>
		<button type="button" class="rs-tabs__tab"
			id="tab-eafcdb"
		
		>EU</button>
	</div>
	
<div class="rs-tabs__panel" id="panel-acedbf">

<ul>
<li>
<p><strong>RudderStack Action Hub Server URL</strong>:  <a href="https://looker-action-hub.rudderstack.com" >https://looker-action-hub.rudderstack.com</a></p>
</li>
<li>
<p><strong>Authorization Token</strong>:</p>
</li>
</ul>
<div class="rs-code">
  <div class="rs-code__head"><button class="rs-code__copy" type="button">
      
      Copy
    </button>
  </div>
  <div class="highlight"><pre class="chroma"><code class="language-text" data-lang="text">75805209b45a55494d0c27d4eb91fbf6bc7fb1a63dfcd9260fe65daee584737b/ea4e074e71c1af9c07bf71f69c1addf7b9a30d458bd7aea4b4e60d6a6a122277b59210186edb7cf21a5ff53a29c68fb89ff5aaf5019570c8a5131484a11e2e3e</code></pre></div>
</div>

</div>

<div class="rs-tabs__panel" id="panel-eafcdb" hidden>

<ul>
<li><strong>RudderStack Action Hub Server URL</strong>:  <a href="https://looker-action-hub.eu.rudderstack.com" >https://looker-action-hub.eu.rudderstack.com</a></li>
<li><strong>Authorization Token</strong>:</li>
</ul>
<div class="rs-code">
  <div class="rs-code__head"><button class="rs-code__copy" type="button">
      
      Copy
    </button>
  </div>
  <div class="highlight"><pre class="chroma"><code class="language-text" data-lang="text">93ceacd6ae64593995163d692888bec22f2b8032eee994cc4d071f0b2392719f/09723f97fb676bd1eeb1efdc3812761d7bdb332af5ad01f4323d30d7e90d9954ecfcb63df2f45094ff9bd1b5dce00111e91c70b8dfdecd731a266468ed0fcadc</code></pre></div>
</div>

</div>

</div>

<blockquote class="warning">
  <div class="tip-quote">
    
    <div class="tip-text">If you encounter an error while connecting to the Action Hub after entering the server URL, click <strong>Configure Authorization</strong> and enter the <strong>Authorization Token</strong>. See <a href="#faq" >FAQ</a> for more information.</div>
  </div>
</blockquote>
<p>You can then start viewing the following three RudderStack actions:</p>
<table>
  <thead>
      <tr>
          <th>Actions</th>
          <th>Description</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>Identify</td>
          <td>Adds the traits to your RudderStack users via the <code>identify</code> event.</td>
      </tr>
      <tr>
          <td>Group</td>
          <td>Adds the traits or users to your RudderStack groups via the <code>group</code> event.</td>
      </tr>
      <tr>
          <td>Track</td>
          <td>Adds the user properties for your users via the <code>track</code> event.</td>
      </tr>
  </tbody>
</table>

<figure class="image--main "  >
    <a 
         href="/docs/images/event-stream-sources/looker-3.webp"
        
        >
        <img src="/docs/images/event-stream-sources/looker-3.webp" 
         alt="RudderStack-hosted Action Hub"  
         
         
        decoding="async" loading="lazy" class="img-shortcode"/>
    </a>
    
</figure>

<!-- end-chunk -->
<!-- begin-chunk -->
<h3 id="configure-actions">Configure actions</h3><ol>
<li>To enable any of the above actions, click the <strong>Settings</strong> button.</li>
<li>Enter the <strong>Write key</strong> obtained after <a href="#configure-looker-source-in-rudderstack" >setting up the Looker source</a> in RudderStack.</li>
<li>Specify the <strong>Rudder Server URL</strong> to which Looker forwards the user looks data. The URL is <code>https://&lt;data_plane_url&gt;/v1/batch</code>,  where <code>&lt;data_plane_url&gt;</code> is your <a class='glossary-tooltip' href='/docs/get-started/introduction/glossary/#data-plane-url'>data plane URLThe data plane URL is the location where events are routed and sent to the RudderStack backend for processing. You can find this URL at the top of the Connections page in your RudderStack dashboard.
</a>.</li>
</ol>

<figure class="image--main "  >
    <a 
         href="/docs/images/event-stream-sources/looker-4.webp"
        
        >
        <img src="/docs/images/event-stream-sources/looker-4.webp" 
         alt="Configuring the Rudder Write Key and Rudder Server URL"  
         
         
        decoding="async" loading="lazy" class="img-shortcode"/>
    </a>
    
</figure>

<p>Once the connection is successful, you should start seeing the RudderStack Actions.</p>
<!-- end-chunk -->
<!-- begin-chunk -->
<h2 id="rudderstack-actions-overview">RudderStack Actions overview</h2><p>Once configured, RudderStack Actions will start sending the query results to RudderStack.</p>
<p>When defining the columns for the Looker models attached to the user looks that you want to send to RudderStack, it&rsquo;s important to tag the user identifier column as <code>email</code> or <code>user_id</code> or <code>rudder_anonymous_id</code>. Additionally, to use the <strong>RudderStack Group</strong> action, you need to tag your group identifier column as <code>rudder_group_id</code>.</p>

<html lang="en">
<blockquote class="info">
  <div class="tip-quote">
    
    <div class="tip-text">In some specific cases, for example, Redis - the <code>user_id</code> must be present even if <code>email</code> is already present.</div>
  </div>
</blockquote>

</html>
<p>Looker sends the other columns related to the user and their activities as traits or properties along with the event payload.</p>
<p>A sample <code>track</code> payload sent by the <strong>RudderStack Track</strong> action:</p>
<div class="rs-code">
  <div class="rs-code__head">javascript<button class="rs-code__copy" type="button">
      
      Copy
    </button>
  </div>
  <div class="highlight"><pre class="chroma"><code class="language-javascript" data-lang="javascript">{
  &#34;userId&#34;: &#34;test@rcomp.es&#34;,
  &#34;anonymousId&#34;: null,
  &#34;properties&#34;: {
    &#34;tracks_flow.event_2&#34;: &#34;Destination_Clicked&#34;,
    &#34;tracks_flow.event_3&#34;: [

    ],
    &#34;tracks_flow.event_4&#34;: [

    ],
    &#34;tracks_flow.event_5&#34;: [

    ],
    &#34;tracks_flow.event&#34;: &#34;User_Logged_In&#34;
  },
  &#34;event&#34;: &#34;single&#34;,
  &#34;context&#34;: {
    &#34;library&#34;: {
      &#34;name&#34;: &#34;analytics-node&#34;,
      &#34;version&#34;: &#34;0.0.3&#34;
    },
    &#34;app&#34;: {
      &#34;name&#34;: &#34;looker/actions&#34;,
      &#34;version&#34;: &#34;dev&#34;
    }
  },
  &#34;timestamp&#34;: &#34;2020-06-18T08:21:01.644Z&#34;,
  &#34;type&#34;: &#34;track&#34;,
  &#34;_metadata&#34;: {
    &#34;nodeVersion&#34;: &#34;12.13.0&#34;
  },
  &#34;originalTimestamp&#34;: &#34;2020-06-18T08:21:03.049Z&#34;,
  &#34;messageId&#34;: &#34;node-c33eb51666f6470bf4aa415c7431aba4-ffd5e198-05a1-477a-9c2c-85be30749b8b&#34;,
  &#34;sentAt&#34;: &#34;2020-06-18T08:21:03.050Z&#34;
}</code></pre></div>
</div>
<p>Note that the column names in your looks are transformed as <code>view name.column name</code> in the payload sent to RudderStack. If you want to change the names as per your destination, you can do so using the <a href="https://www.rudderstack.com/docs/transformations/overview/" >Transformations</a> feature.</p>
<!-- end-chunk -->
<!-- begin-chunk -->
<h2 id="faq">FAQ</h2><!-- end-chunk -->
<!-- begin-chunk -->
<h4 id="i-get-an-error-while-connecting-to-the-rudderstack-action-hub-what-should-i-do">I get an error while connecting to the RudderStack Action Hub. What should I do?</h4><p>While connecting to the RudderStack Action Hub, you may sometimes get the following error:</p>

<figure class="image--main "  >
    <a 
         href="/docs/images/event-stream-sources/looker-source-error-1.webp"
        
        >
        <img src="/docs/images/event-stream-sources/looker-source-error-1.webp" 
         alt="RudderStack Action Hub error"  
         
         
        decoding="async" loading="lazy" class="img-shortcode"/>
    </a>
    
</figure>

<p>To resolve this issue:</p>
<ol>
<li>Click <strong>Configure Authorization</strong>.</li>
</ol>

<figure class="image--main "  >
    <a 
         href="/docs/images/event-stream-sources/looker-source-error-2.webp"
        
        >
        <img src="/docs/images/event-stream-sources/looker-source-error-2.webp" 
         alt="RudderStack Action Hub error"  
         
         
        decoding="async" loading="lazy" class="img-shortcode"/>
    </a>
    
</figure>

<ol start="2">
<li>Enter the <a href="#add-rudderstack-action-hub-server" >region-specific authorization token</a> and click <strong>Update Token</strong>.</li>
</ol>

<figure class="image--main "  >
    <a 
         href="/docs/images/event-stream-sources/looker-source-error-3.webp"
        
        >
        <img src="/docs/images/event-stream-sources/looker-source-error-3.webp" 
         alt="RudderStack Action Hub error"  
         
         
        decoding="async" loading="lazy" class="img-shortcode"/>
    </a>
    
</figure>


