Medieval society was diverse, so was its spirituality. Not all Christians were fans of miracle stories and not all went on pilgrimage. Miracles and pilgrimages are nonetheless an important mark of medieval piety.
The development of Marian pilgrimages dates to the 10th century.
There have been small Marian shrines since ancient times. For example, the chapel of Mary "Star of the Sea" in Maastricht in the 4th century, and the cathedrals of Chartres and Puy en Velay in the 5th century.
There were already many Marian shrines in the Merovingian period .
It should be noted, however, that during the first millennium, the pilgrimages of Western Europe were centered mainly on the tomb of Saint Peter .
According to Flodoard of Reims (archivist of the cathedral of Reims, d. 966), Marian pilgrimages took on a greater importance (in Reims first and then everywhere) beginning in the year 924 [ 3].
Marian pilgrimages were tied to religious edifices and were the occasion of many miracles.
Their popularity kept pace with the construction of new churches and cathedrals, and with the development of architecture.
Stories of miracles describe a light coming from a religious structure  or from the vision of Our Lady. Whereas in the Christian East, miracles attributed to the intercession of the Mother of God are linked to her icons, in the Christian West the miracles of the Virgin Mary are linked to buildings, churches and cathedrals.
This explains why book compilations of miracles were sponsored by bishops, and very much appreciated by the canons who officiated in cathedrals and basilicas.
Jean de Coutance (first quarter of the 12th century) bears witness to this epoch:
"In the happy days of Geoffroy, bishop of the church of Coutances, flourished the worship and radiated far and away the virtue of miracles. The bishop, a wise and prudent man, ordered to write down with a competent pen the virtue of the miracles which were seen in this church, to praise God and to honor his glorious Lady, the Virgin Mother, and to edify his successors. He ordered the making of a golden book set with precious stones from distant places for the honor of the Blessed Virgin Mary. "
The clergy used miracle stories in their teaching.
The clergy had to address a diverse public – a reflection of the whole society.
For example, in Chartres (France),
People came on pilgrimage bringing the concerns of their daily life.
At that time, people went on pilgrimage to present to Mary ordinary worries.
South of the Loire River, in Rocamadour, the people’s worries came from feudal wars, and it is not surprising that in this region mostly men went on pilgrimage (only 25% of women) and the recipient of miracles were especially nobles and soldiers.
North of the Loire, for example in Paris and Arras , people were worried about plague epidemics and “St Anthony’s fire,” the ergot illness that spread through the rye cultivated on recently cleared land. The miraculously healed were in majority children and the poor. 
 Guy Philippart, Le récit miraculaire marial dans l'Occident médiéval, dans Marie, le culte de la Vierge dans la société médiévale, Beauchêne, Paris 1996, p. 573
 Jean de Coutance, Miracula Sanctae Mariae Constantiae, éd. E.-A. Pideon, in Histoire de la cathédrale de Coutance, Coutances, 1876, pp. 367-383
 Cf. Jean le Marchant, Miracles de Notre Dame de Chartres, éditions P. Kunstmann, Ottawa/Chartres, 1973, p. 170-181
 Gabriela Signori, « La bienheureuse polysémie », dans Marie, le culte de la Vierge dans la société médiévale, Beauchêne, Paris 1996, p. 612.