Download the PHP package remp/beam-module without Composer

On this page you can find all versions of the php package remp/beam-module. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package beam-module

Beam

Beam admin provides a way to display real time usage stats on your website, aggregated article/author/conversion data and allows you to create user segments based on the tracked data.

Technical description

Dashboard

Dashboard provides you with realtime data about your website's traffic. This data include:

All of these statistics are provided realtime and updated every couple of seconds automatically.

For dashboard to work correctly, you need to:

Note: Timespent tracking is not mandatory. Dashboard can utilize regular pageview data instead to calculate number of concurrents. If you don't plan to track timespent, please see this Telegraf configuration options so you can switch to pageview-based concurrents instead.

Dashboard allows you to display detail of each article with pageview-related chart containing histogram of visits split by traffic source medium (same as in the main dashboard) and also displays article-related events.

Source medium labels

Optionally, you can configure labels for source mediums of your pageviews. Labels will be shown in dashboard traffic (and article detail traffic) instead of real tracked values.

Currently, you can do it directly by editing database table referer_medium_labels.

Accounts

Accounts represent an access point to Beam data. Currently it's not utilized in any way, but in the future you'll be able to configure access to data based on allowed accounts per each user.

As of now, it's OK to create one single account for your organization (e.g. with the name of your newspaper).

Properties

Property is a unit that you want to track (website, subapplication, mobile app). Account can have multiple properties. In the future, Beam will allow to data for selected property.

Each property has a token that needs to be used within JS snippet (rempConfig.token).

Segments

Beam is able to provide behavioral segments based on the events tracked to the system by JS snippet and by backend APIs.

Regular segments

Regular segments can be created via web UI. Segment builder tool allows you to select multiple conditions based on which the users and browsers (implying that also anonymous users are segmentable) will be checked against specific segment.

Segment builder tool always displays only options based on events that were already tracked. If you want to create a segment with some specific condition, there should be at least one event in the system matching the condition.

Author segments

If some of your readers are interested only in specific of authors, Beam can identify such users and generate authors segments. Each author segment contain users, which are returning back and reading mostly the author that the segment belongs to.

As calculation of these segments it's computation intensive operation, author segments are computed on backend by running php artisan segments:compute-author-segments.

Each segment contains users and browsers assigned to it according to criteria, which can be adjusted in Beam admin settings page (/author-segments/configuration).

The command is not run by default (therefore no author segments exist). One has to run it manually when needed or schedule it to recompute segments periodically. We recommend to schedule computation of segment every night and we included Cron snippet within Scheduled events section

Entities

Entities are experimental feature allowing you to define and then track objects into Beam. It's designed to help you eventually create segments based on data in your system - by pushing the necessary data to Beam first.

Let's explain the feature on the example of tracking and generating segments based on delivery of print to your users.

To start using entities, first run EntitySeeder to populate necessary items into the database.

Then, visit /entities and define what's structure of your entities. In our example, this new entity could be called print_delivery and the parent entity user (as we want to track it for each user). Each entity has to belong to some other entity - either to default user entity or to one of your entities.

We could add a couple of parameters for this entity:

Once saved, this entity will be propagated to your Tracker API and you can start tracking your entities. Tracker API will also validate your payload so you don't accidentally push invalid entity.

You can test tracking new print_delivery by running following command (change property_token to yours):

The description of API can be found in Tracker's swagger.json.

As of today, entities are not linked to Segment builder UI and are only stored to Elasticsearch for later use. As they're experimental feature, the APIs might change in the future and it's not recommended for production use.

Newsletters

When Beam is configured to work with Mailer (REMP_MAILER_ADDR is populated), Beam allows you to configure automatic generation of newsletters. Content of this email would be based on articles selected by Beam automatically also with the option to personalize the email for each user separately.

When you want to add newsletter, following is required:

Once configured, you should run (and schedule) email sending command:

Articles

Beam provides pageview-related and conversion-related stats for articles. To be able to display this data, Beam needs you to push Article and Conversion metadata first. Please see Article tracking and Conversion tracking sections to see definition of API calls you should request from your CMS/CRM.

If you have your Laravel scheduler enabled and you track your pageviews via JS snippet, you can now display statistics for articles:

Conversions

Conversions section provides information about single conversions that you tracked via Conversion tracking and lets you filter conversions based on authors and sections.

Section also includes experimental User path feature which attempts to extract aggregate of events that occur before the conversion happens. In its current state it only provides counts and share of events that happen right before the payment.

To start using the feature, please run (and schedule) following command to create aggregates first:

Authors

This section provides similar view as Articles section does - with the difference that here you can see aggregated data for each author. When you select a specific author, Beam displays article statistics for given author.

You can filter the data based on publish date of articles.

Visitors

Visitors section provides aggregate view on where your visitors are coming from and from what devices. Section allows you to filter the results based on date range of targeted visit and based on subscription status - so you can differentiate where your subscribers are coming from and where you non-paying users are coming from.

API Documentation

Beam itself serves as a tool for tracking the data and displaying them in a nice fashion. Beam admin has couple of APIs for providing metadata for Articles and Conversions that need to be stored persistently in MySQL

Note: All Elasticsearch data should be always treated as non-persistent and backed up if necessary.

All examples use http://beam.remp.press as a base domain. Please change the host to the one you use before executing the examples.

All examples use XXX as a default value for authorization token, please replace it with the real token API token that can be acquired in the REMP SSO.

All requests should contain (and be compliant) with the follow HTTP headers.

API responses can contain following HTTP codes:

Value Description
200 OK Successful response, default value
400 Bad Request Invalid request (missing required parameters)
403 Forbidden The authorization failed (provided token was not valid)
404 Not found Referenced resource wasn't found

If possible, the response includes application/json encoded payload with message explaining the error further.


POST /api/articles/upsert (DEPRECATED - click here for v2)

Your CMS should track all article-related changes to Beam so Beam knows about the article, who's the author and to which sections it belongs to. Once the article data is available to Beam, system starts to link various statistics that you've tracked with your JS snippet for given article (e.g. pageviews, time spent, reading progress) and data related to Beam (e.g. A/B testing of titles).

Headers:
Name Value Required Description
Authorization Bearer String yes API token.
Content-Type application/json yes
Accept application/json yes
Body:
Examples:
curl
raw PHP
Response:

Any create/update matching is based on the article's external_id. You're free to update the article as many times as you want.


POST /api/v2/articles/upsert

Your CMS should track all article-related changes to Beam so Beam knows about the article, who's the author and to which sections it belongs to. Once the article data is available to Beam, system starts to link various statistics that you've tracked with your JS snippet for given article (e.g. pageviews, time spent, reading progress) and data related to Beam (e.g. A/B testing of titles).

Headers:
Name Value Required Description
Authorization Bearer String yes API token.
Content-Type application/json yes
Accept application/json yes
Body:
Examples:
curl
raw PHP
Response:

Any create/update matching is based on the article's external_id. You're free to update the article as many times as you want.


POST /api/articles/read

List already read articles based on filter.

Headers:
Name Value Required Description
Authorization Bearer String yes API token.
Content-Type application/json yes
Accept application/json yes
Body:
Examples:
curl
raw PHP
Response:

POST api/conversions/upsert

Beam admin provides statistics about article/author performance. One of the metrics used are conversions. This endpoint stores minimal conversion data. Extended data should be additionally tracked via Tracker API (see /track/commerce definition in Tracker's swagger.json file).

Headers:
Name Value Required Description
Authorization Bearer String yes API token.
Content-Type application/json yes
Accept application/json yes
Body:
Examples:
curl
raw PHP
Response:

POST api/articles/top

Beam admin provides statistics about article performance. This endpoint return top articles by pageviews. You can filter articles by content type, sections, authors, tags or tag categories.

Headers:
Name Value Required Description
Authorization Bearer String yes API token.
Content-Type application/json yes
Accept application/json yes
Body:
Examples:
curl
raw PHP
Response:

POST api/v2/articles/top

Beam admin provides statistics about article performance. This endpoint return top articles by pageviews. You can filter articles by content type, sections, authors, tags or tag categories.

You can combine multiple filters for each filter category. Filters in and between categories are joined with AND, values in filter are joined with OR.

Headers:
Name Value Required Description
Authorization Bearer String yes API token.
Content-Type application/json yes
Accept application/json yes
Body:
Examples:
curl
raw PHP
Response:

POST api/authors/top

Beam admin provides statistics about author performance. This endpoint return top authors by pageviews. You can filter authors by content type, sections, tags or tag categories.

Headers:
Name Value Required Description
Authorization Bearer String yes API token.
Content-Type application/json yes
Accept application/json yes
Body:
Examples:
curl
raw PHP
Response:

POST api/v2/authors/top

Beam admin provides statistics about author performance. This endpoint return top authors by pageviews. You can filter authors by content type, sections, tags or tag categories.

You can combine multiple filters for each filter category. Filters in and between categories are joined with AND, values in filter are joined with OR.

Headers:
Name Value Required Description
Authorization Bearer String yes API token.
Content-Type application/json yes
Accept application/json yes
Body:
Examples:
curl
raw PHP
Response:

POST api/tags/top

Beam admin provides statistics about tag performance. This endpoint return top post tags by pageviews. You can filter tags by content type, sections, authors or tag categories.

Headers:
Name Value Required Description
Authorization Bearer String yes API token.
Content-Type application/json yes
Accept application/json yes
Body:
Examples:
curl
raw PHP
Response:

POST api/v2/tags/top

Beam admin provides statistics about tag performance. This endpoint return top post tags by pageviews. You can filter tags by content type, sections, authors or tag categories.

You can combine multiple filters for each filter category. Filters in and between categories are joined with AND, values in filter are joined with OR.

Headers:
Name Value Required Description
Authorization Bearer String yes API token.
Content-Type application/json yes
Accept application/json yes
Body:
Examples:
curl
raw PHP
Response:

POST api/pageviews/histogram

Beam admin provides pageviews histogram for articles satisfying the filter for days in date range. You can filter articles by content type, sections, authors, tags or tag categories.

You can combine multiple filters for each filter category. Filters in and between categories are joined with AND, values in filter are joined with OR.

Headers:
Name Value Required Description
Authorization Bearer String yes API token.
Content-Type application/json yes
Accept application/json yes
Body:
Examples:
curl
raw PHP
Response:

GET /api/articles

Returns list of articles specified by ids or external ids.

Headers:
Name Value Required Description
Authorization Bearer String yes API token.
Accept application/json yes
Parameters:
Name Value Required Description
ids String no Article's IDs separated by comma.
external_ids String no Article's external IDs separated by comma.
per_page Integer no Number of items displayed per page.
Examples:
curl
raw PHP
Response:

GET /api/authors

Returns list of authors.

Headers:
Name Value Required Description
Authorization Bearer String yes API token.
Accept application/json yes
Parameters:
Name Value Required Description
per_page Integer no Number of items displayed per page.
Examples:
curl
raw PHP
Response:

GET /api/conversions

Returns list of conversions.

Headers:
Name Value Required Description
Authorization Bearer String yes API token.
Accept application/json yes
Parameters:
Name Value Required Description
conversion_from String no RFC3339 datetime from which will be items filtered.
conversion_to String no RFC3339 datetime to which will be items filtered.
per_page Integer no Number of items displayed per page.
Examples:
curl
raw PHP
Response:

GET /api/sections

Returns list of sections.

Headers:
Name Value Required Description
Authorization Bearer String yes API token.
Accept application/json yes
Parameters:
Name Value Required Description
per_page Integer no Number of items displayed per page.
Examples:
curl
raw PHP
Response:

GET /api/tags

Returns list of tags.

Headers:
Name Value Required Description
Authorization Bearer String yes API token.
Accept application/json yes
Parameters:
Name Value Required Description
per_page Integer no Number of items displayed per page.
Examples:
curl
raw PHP
Response:

All versions of beam-module with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
ext-json Version *
ext-pcntl Version *
arrilot/laravel-widgets Version ^3.13
doctrine/dbal Version ^3.1
fideloper/proxy Version ^4.4
fruitcake/laravel-cors Version ^v3.0.0
google/apiclient Version ^2.9
guzzlehttp/guzzle Version ^7.0.1
kouz/laravel-airbrake Version ^0.7.0
laminas/laminas-diactoros Version ^2.5
laracasts/flash Version ^3.2
laravel/framework Version ^8.44
laravelcollective/html Version ^6.2
league/uri Version ^6.7
marc-mabe/php-enum Version ^3.0
matomo/device-detector Version ^4.2
matomo/searchengine-and-social-list Version ^3.11
php-amqplib/php-amqplib Version ^v2.12
predis/predis Version ^1.1
remp/laravel-helpers Version *
remp/laravel-sso Version *
remp/laravel-widgets Version *
remp/remp-commons Version *
sentry/sentry-laravel Version ^2.6
simshaun/recurr Version ^5.0
spatie/laravel-searchable Version ^1.9
snowplow/referer-parser Version dev-master
snowplow/referer-parser-php Version 0.0.1
symfony/cache Version ^5.2
symfony/psr-http-message-bridge Version ^v2.1.2
symfony/yaml Version ^6.0
tightenco/ziggy Version ^1.2
ukfast/laravel-health-check Version ^1.5
yadakhov/insert-on-duplicate-key Version ^1.2
yajra/laravel-datatables-oracle Version ^9.18
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package remp/beam-module contains the following files

Loading the files please wait ....