# Ruby on Rails (https://talivia.com/docs/installation-guides/ruby-on-rails)



Add Talivia to the application layout so every rendered page includes the tracker.




## Add the script [#add-the-script]

Open `app/views/layouts/application.html.erb` and place the snippet before the closing `</body>` tag.

```html
<%= yield %>
<script defer src="https://talivia.com/script.js" data-website-id="YOUR_WEBSITE_ID"></script>
</body>
```

Replace the website ID. Copy the ID from Talivia Settings -> Tracking for this Rails domain.

Open the Rails app in a browser and check Talivia for the new session.
